Skip to content

Commit 2b91439

Browse files
author
Ron Petrusha
authored
Added VB examples (#2448)
1 parent b77befe commit 2b91439

File tree

2 files changed

+62
-50
lines changed

2 files changed

+62
-50
lines changed

xml/System.Net.Security/AuthenticatedStream.xml

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@
4141
4242
4343
## Examples
44-
The following code example demonstrates displaying the properties of an authenticated stream.
45-
46-
[!code-cpp[NclNegoAsyncClient#6](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#6)]
47-
[!code-csharp[NclNegoAsyncClient#6](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#6)]
44+
The following example demonstrates displaying the properties of an authenticated stream.
4845
46+
[!code-cpp[NclNegoAsyncClient#6](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#6)]
47+
[!code-csharp[NclNegoAsyncClient#6](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#6)]
48+
[!code-vb[NclNegoAsyncClient#6](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#6)]
49+
4950
]]></format>
5051
</remarks>
5152
<block subset="none" type="overrides">
@@ -273,11 +274,12 @@
273274
274275
275276
## Examples
276-
The following code example demonstrates displaying the value of this property.
277-
278-
[!code-cpp[NclNegoAsyncClient#6](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#6)]
279-
[!code-csharp[NclNegoAsyncClient#6](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#6)]
277+
The following example demonstrates displaying the value of this property.
280278
279+
[!code-cpp[NclNegoAsyncClient#6](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#6)]
280+
[!code-csharp[NclNegoAsyncClient#6](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#6)]
281+
[!code-vb[NclNegoAsyncClient#6](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#6)]
282+
281283
]]></format>
282284
</remarks>
283285
</Docs>
@@ -323,11 +325,12 @@
323325
324326
325327
## Examples
326-
The following code example demonstrates displaying the value of this property.
327-
328-
[!code-cpp[NclNegoAsyncClient#6](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#6)]
329-
[!code-csharp[NclNegoAsyncClient#6](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#6)]
328+
The following example demonstrates displaying the value of this property.
330329
330+
[!code-cpp[NclNegoAsyncClient#6](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#6)]
331+
[!code-csharp[NclNegoAsyncClient#6](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#6)]
332+
[!code-vb[NclNegoAsyncClient#6](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#6)]
333+
331334
]]></format>
332335
</remarks>
333336
</Docs>
@@ -373,11 +376,12 @@
373376
374377
375378
## Examples
376-
The following code example demonstrates displaying the value of this property.
377-
378-
[!code-cpp[NclNegoAsyncClient#6](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#6)]
379-
[!code-csharp[NclNegoAsyncClient#6](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#6)]
379+
The following example demonstrates displaying the value of this property.
380380
381+
[!code-cpp[NclNegoAsyncClient#6](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#6)]
382+
[!code-csharp[NclNegoAsyncClient#6](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#6)]
383+
[!code-vb[NclNegoAsyncClient#6](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#6)]
384+
381385
]]></format>
382386
</remarks>
383387
</Docs>
@@ -423,11 +427,12 @@
423427
424428
425429
## Examples
426-
The following code example demonstrates displaying the value of this property.
427-
428-
[!code-cpp[NclNegoAsyncClient#6](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#6)]
429-
[!code-csharp[NclNegoAsyncClient#6](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#6)]
430+
The following example demonstrates displaying the value of this property.
430431
432+
[!code-cpp[NclNegoAsyncClient#6](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#6)]
433+
[!code-csharp[NclNegoAsyncClient#6](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#6)]
434+
[!code-vb[NclNegoAsyncClient#6](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#6)]
435+
431436
]]></format>
432437
</remarks>
433438
</Docs>
@@ -473,10 +478,11 @@
473478
474479
475480
## Examples
476-
The following code example demonstrates displaying the value of this property.
481+
The following example demonstrates displaying the value of this property.
477482
478-
[!code-cpp[NclNegoAsyncClient#6](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#6)]
479-
[!code-csharp[NclNegoAsyncClient#6](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#6)]
483+
[!code-cpp[NclNegoAsyncClient#6](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#6)]
484+
[!code-csharp[NclNegoAsyncClient#6](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#6)]
485+
[!code-vb[NclNegoAsyncClient#6](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#6)]
480486
481487
]]></format>
482488
</remarks>

xml/System.Net.Security/NegotiateStream.xml

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,16 @@
5353
5454
5555
## Examples
56-
The following code example demonstrates the client side of a client-server connection that uses the <xref:System.Net.Security.NegotiateStream>. The client authenticates and sends a message to the server asynchronously.
56+
The following example demonstrates the client side of a client-server connection that uses the <xref:System.Net.Security.NegotiateStream>. The client authenticates and sends a message to the server asynchronously.
5757
58-
[!code-cpp[NclNegoAsyncClient#0](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#0)]
59-
[!code-csharp[NclNegoAsyncClient#0](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#0)]
60-
61-
The following code example demonstrates the server side of a client-server connection that uses the <xref:System.Net.Security.NegotiateStream> to authenticate the client and read a message sent by the client.
58+
[!code-cpp[NclNegoAsyncClient#0](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#0)]
59+
[!code-csharp[NclNegoAsyncClient#0](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#0)]
60+
[!code-vb[NclNegoAsyncClient#0](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#0)]
61+
62+
The following code example demonstrates the server side of a client-server connection that uses the <xref:System.Net.Security.NegotiateStream> to authenticate the client and read a message sent by the client.
6263
63-
[!code-cpp[NclNegoAsyncServer#0](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoAsyncServer/CPP/NclNegoAsyncServer.cpp#0)]
64-
[!code-csharp[NclNegoAsyncServer#0](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoAsyncServer/CS/server.cs#0)]
64+
[!code-cpp[NclNegoAsyncServer#0](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoAsyncServer/CPP/NclNegoAsyncServer.cpp#0)]
65+
[!code-csharp[NclNegoAsyncServer#0](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoAsyncServer/CS/server.cs#0)]
6566
6667
]]></format>
6768
</remarks>
@@ -185,11 +186,12 @@
185186
186187
187188
## Examples
188-
The following code example demonstrates calling this constructor. This code example is part of a larger example provided for the <xref:System.Net.Security.NegotiateStream> class.
189-
190-
[!code-cpp[NclNegoAsyncClient#1](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#1)]
191-
[!code-csharp[NclNegoAsyncClient#1](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#1)]
189+
The following example demonstrates calling this constructor. This code example is part of a larger example provided for the <xref:System.Net.Security.NegotiateStream> class.
192190
191+
[!code-cpp[NclNegoAsyncClient#1](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#1)]
192+
[!code-csharp[NclNegoAsyncClient#1](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#1)]
193+
[!code-vb[NclNegoAsyncClient#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#1)]
194+
193195
]]></format>
194196
</remarks>
195197
<exception cref="T:System.ArgumentNullException">
@@ -1503,11 +1505,12 @@
15031505
15041506
15051507
## Examples
1506-
The following code example demonstrates calling this method to begin an asynchronous authentication for the client.
1507-
1508-
[!code-cpp[NclNegoAsyncClient#2](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#2)]
1509-
[!code-csharp[NclNegoAsyncClient#2](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#2)]
1508+
The following example demonstrates calling this method to begin an asynchronous authentication for the client.
15101509
1510+
[!code-cpp[NclNegoAsyncClient#2](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#2)]
1511+
[!code-csharp[NclNegoAsyncClient#2](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#2)]
1512+
[!code-vb[NclNegoAsyncClient#2](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#2)]
1513+
15111514
]]></format>
15121515
</remarks>
15131516
<exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to retry the authentication.</exception>
@@ -2304,16 +2307,18 @@
23042307
23052308
23062309
## Examples
2307-
The following code example demonstrates beginning an asynchronous write operation.
2310+
The following example demonstrates beginning an asynchronous write operation.
23082311
2309-
[!code-cpp[NclNegoAsyncClient#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#3)]
2310-
[!code-csharp[NclNegoAsyncClient#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#3)]
2311-
2312-
The following method is called when the operation completes.
2313-
2314-
[!code-cpp[NclNegoAsyncClient#4](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#4)]
2315-
[!code-csharp[NclNegoAsyncClient#4](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#4)]
2312+
[!code-cpp[NclNegoAsyncClient#3](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#3)]
2313+
[!code-csharp[NclNegoAsyncClient#3](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#3)]
2314+
[!code-vb[NclNegoAsyncClient#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#3)]
2315+
2316+
The following method is called when the operation completes.
23162317
2318+
[!code-cpp[NclNegoAsyncClient#4](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#4)]
2319+
[!code-csharp[NclNegoAsyncClient#4](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#4)]
2320+
[!code-vb[NclNegoAsyncClient#4](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#4)]
2321+
23172322
]]></format>
23182323
</remarks>
23192324
<exception cref="T:System.ArgumentNullException">
@@ -2871,11 +2876,12 @@ Authentication has not occurred.</exception>
28712876
28722877
28732878
## Examples
2874-
The following code example demonstrates a method that is called to complete the asynchronous write operation. For an example that demonstrates starting the operation, see <xref:System.Net.Security.NegotiateStream.BeginWrite%2A>.
2875-
2876-
[!code-cpp[NclNegoAsyncClient#4](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#4)]
2877-
[!code-csharp[NclNegoAsyncClient#4](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#4)]
2879+
The following example demonstrates a method that is called to complete the asynchronous write operation. For an example that demonstrates starting the operation, see <xref:System.Net.Security.NegotiateStream.BeginWrite%2A>.
28782880
2881+
[!code-cpp[NclNegoAsyncClient#4](~/samples/snippets/cpp/VS_Snippets_Remoting/NclNegoasyncClient/CPP/NclNegoasyncClient.cpp#4)]
2882+
[!code-csharp[NclNegoAsyncClient#4](~/samples/snippets/csharp/VS_Snippets_Remoting/NclNegoasyncClient/CS/client.cs#4)]
2883+
[!code-vb[NclNegoAsyncClient#4](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NclNegoasyncClient/VB/client.vb#4)]
2884+
28792885
]]></format>
28802886
</remarks>
28812887
<exception cref="T:System.ArgumentNullException">

0 commit comments

Comments
 (0)