Skip to content

Conversation

@obelink
Copy link
Contributor

@obelink obelink commented Mar 21, 2019

This PR contributes to:
dotnet/dotnet-api-docs#2069

Added the VB example for NegotiateStream.

Added VB example for NegotiateStream
@obelink obelink requested a review from rpetrusha as a code owner March 21, 2019 23:32
obelink added a commit to obelink/dotnet-api-docs that referenced this pull request Mar 21, 2019
Added references to the VB samples. 
This commit is related to PR: dotnet/samples#737
Copy link

@rpetrusha rpetrusha left a 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>

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)

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bad alignment

Copy link

@rpetrusha rpetrusha left a 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.

@obelink
Copy link
Contributor Author

obelink commented Mar 22, 2019

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?

@rpetrusha
Copy link

Topic by topic probably works best, @obelink.

Copy link

@rpetrusha rpetrusha left a 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.

@rpetrusha
Copy link

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.

@rpetrusha rpetrusha merged commit 5d17dea into dotnet:master May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants