-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[textanalytics] Add Debug Proxy class for ExtractKeyPhrasesResultCollection #18690
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Draft
mode if it is:General Guidelines and Best Practices
Testing Guidelines
SDK Generation Guidelines
*.csproj
andAssemblyInfo.cs
files 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 service
label and/or contact assigned reviewer.Verify Code Generation
step, please ensure:generate.ps1/cmd
to generate this PR instead of callingautorest
directly.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.