[textanalytics] Add Debug Proxy class for ExtractKeyPhrasesResultCollection#18690
[textanalytics] Add Debug Proxy class for ExtractKeyPhrasesResultCollection#18690maririos merged 4 commits intoAzure:masterfrom
Conversation
|
@maririos So this is the only way I could get it to work. Adding a new class that defines how the Collection will look like in the debugger. If this works I can add do it for the other classes as well, or maybe this can be done during generation somehow. |
| /// <summary> | ||
| /// Debugger Proxy class for <see cref="ExtractKeyPhrasesResultCollection"/>. | ||
| /// </summary> | ||
| public class ExtractKeyPhrasesResultCollectionDebugView |
There was a problem hiding this comment.
we can make this class internal
| /// Initializes a new instance of the <see cref="ExtractKeyPhrasesResultCollectionDebugView"/> class. | ||
| /// </summary> | ||
| /// <param name="collection"></param> | ||
| public ExtractKeyPhrasesResultCollectionDebugView(ExtractKeyPhrasesResultCollection collection) |
There was a problem hiding this comment.
we can follow what https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/core/Azure.Core/src/Internal/ResponseDebugView.cs is doing. We won't need to add the docstrings so no worries about later keeping them up to date
| /// Collection of <see cref="ExtractKeyPhrasesResult"/> objects corresponding | ||
| /// to a batch of documents. | ||
| /// </summary> | ||
| public List<ExtractKeyPhrasesResult> Items |
There was a problem hiding this comment.
my concern with having Items is that the user might see this in the debugger and then they will expect for ExtractKeyPhrasesResultCollection to have a property called Items.
There was a problem hiding this comment.
Add [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] on this property.
|
@pakrym do you know if there is another way we could achieve showing |
|
Yeah, try using |
|
@maririos I moved the DebugView class inside the original class like we discussed before so it's not forgotten when changes are made to the original class. |


fixes #16283
All SDK Contribution checklist:
This checklist is used to make sure that common guidelines for a pull request are followed.
Draftmode if it is:General Guidelines and Best Practices
Testing Guidelines
SDK Generation Guidelines
*.csprojandAssemblyInfo.csfiles have been updated with the new version of the SDK. Please double check nuget.org current release version.Additional management plane SDK specific contribution checklist:
Note: Only applies to
Microsoft.Azure.Management.[RP]orAzure.ResourceManager.[RP]Management plane SDK Troubleshooting
new servicelabel and/or contact assigned reviewer.Verify Code Generationstep, please ensure:generate.ps1/cmdto generate this PR instead of callingautorestdirectly.Please pay attention to the @microsoft.csharp version output after running generate.ps1. If it is lower than current released version (2.3.82), please run it again as it should pull down the latest version,
Old outstanding PR cleanup
Please note:
If PRs (including draft) has been out for more than 60 days and there are no responses from our query or followups, they will be closed to maintain a concise list for our reviewers.