-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Added VB example for NegotiateStream #737
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
Added VB example for NegotiateStream #737
Conversation
Added VB example for NegotiateStream
Added references to the VB samples. This commit is related to PR: dotnet/samples#737
rpetrusha
left a comment
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.
Thank you, @obelink, for adding another Visual Basic example. I've left a couple of comments that recommend some changes. Some of the blank lines could also be removed.
Are you also planning to submit a PR to add these examples to the NegotiateStream reference documentation?
| Imports System.Net.Sockets | ||
| Imports System.Net.Security | ||
| Imports System.Net | ||
| '<snippet0> |
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 line should be moved to precede Imports System.Text -- we want the list of imports to be included in the example.
| ' Pass the NegotiateStream as the AsyncState object | ||
| ' so that it is available to the callback delegate. | ||
| Dim ar = authStream.BeginAuthenticateAsClient( | ||
| New AsyncCallback(AddressOf EndAuthenticateCallback), authStream) |
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.
bad alignment
| ' Encode the test data into a byte array. | ||
| Dim message = Encoding.UTF8.GetBytes("Hello from the client.") | ||
| ar = authStream.BeginWrite(message, 0, message.Length, | ||
| New AsyncCallback(AddressOf EndWriteCallback), authStream) |
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.
bad alignment
rpetrusha
left a comment
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.
Sorry, @obelink. I'd commented rather than requested changes in my earlier comments.
|
Will take care of these changes. And yes, I will do a PR to add these samples to the documentation. Already started that, but saw thate there are much more VB samples involved for related/underlying pages. Wjat do you prefer.. Page by page or Topic by Topic? |
|
Topic by topic probably works best, @obelink. |
rpetrusha
left a comment
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.
Inadvertently approved this PR. Requesting changes again.
|
I've addressed my earlier comments, @obelink, so I'll merge your PR, as well as open a PR in dotnet/dotnet-api-docs to add the example to the documentation. We'd welcome additional VB examples as you have time. |
This PR contributes to:
dotnet/dotnet-api-docs#2069
Added the VB example for NegotiateStream.