- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.6k
 
NegotiateStream - update documentation #4335
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
NegotiateStream - update documentation #4335
Conversation
| ## Examples | ||
| The following code example demonstrates flushing the stream. | ||
| [!code-csharp[NclNegoSyncClient#4](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#4)] | 
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.
The code sample isn't rendering in the preview. Also, I don't see a snippet4 in the file:
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.
this section in the file is referred from multiple places. I will take a look if it renders correctly on other places too.
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.
there is quite inconsistency in the examples:
C++ and VB are same and uses BexinXXX, EndXXX methods
C# uses XXXAsync methods.
NclNegoasyncClient.cpp
client.cs
client.vb
It implies that in the BexinXXX method docs we show C# example however not for the specific api. On other side C++ and VB are accurate.
I'm not sure how to handle it as there is several options:
- Create BexinXXX, EndXXX variant for C# async methods
- it demonstrate legacy approach
 - we still need Task based async examples - code duplication
 
 - Let it like it is and remove C# example from  BexinXXX, EndXXX
- It sounds strange to me as C# is main .net language and we would offer examples in other languages only
 
 - Rework VB + C++ to not use BexinXXX, EndXXX but Task based async methods
- It would unify the examples
 - it would require remove examples from BexinXXX, EndXXX docs and move it to Task based async methods
 
 
Example of mismatched examples:
https://docs.microsoft.com/en-us/dotnet/api/system.net.security.negotiatestream.beginwrite?view=netcore-3.1
The C# example doesn't contain the related api.
@karelz, any thought?
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.
I removed the example completely. There is follow up ticket: #4390
Co-authored-by: Genevieve Warren <gewarren@microsoft.com>
…et-api-docs into jajahoda/NegotiateStream
Summary
Collect all changes from #3916 related to NegotiateStream