Allow extracting param as resource-derived type #15282
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #15036
I've implemented this so that I only show the option for resource-derived types when extracting parameters when the resource-derived type would not be a simple type. So in this case I just show 'object' as an option.
![image](https://private-user-images.githubusercontent.com/6913354/376323425-80dba74f-b2ee-49dc-a830-5fc91a9f1d95.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMTQ1MjcsIm5iZiI6MTczOTAxNDIyNywicGF0aCI6Ii82OTEzMzU0LzM3NjMyMzQyNS04MGRiYTc0Zi1iMmVlLTQ5ZGMtYTgzMC01ZmM5MWE5ZjFkOTUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMTEzMDI3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWFiNzY0M2RjYjNlMzAxNThjMzBjODFiYTU4ZWMwOGQ0MmM0OGFlMjk5MzhhZjAyZTNlMTYyOGJlNTU4MTUwYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.u-drhHZLKbDHCCRngzxpHTdUo2GnTp5sqRiJx0M8Dy8)
Whereas here's an example where I do show the option:
![image](https://private-user-images.githubusercontent.com/6913354/376323435-b8c7efab-8de2-4a0b-80be-bffcd29b0cb6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMTQ1MjcsIm5iZiI6MTczOTAxNDIyNywicGF0aCI6Ii82OTEzMzU0LzM3NjMyMzQzNS1iOGM3ZWZhYi04ZGUyLTRhMGItODBiZS1iZmZjZDI5YjBjYjYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMTEzMDI3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzdmZWRjY2YyZThmNWU2MjQ4NTAzZTdkZjAyNDRlMjJjN2RkOTMxMzM4NDA0YmFkZGI3NzA1NDA3YWE4ZjlhOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.8Bt7FtMuU0c5Mnee0_PtthG9mRLapyFhJKQ_0k8als8)
Microsoft Reviewers: Open in CodeFlow