Skip to content

Commit 249889f

Browse files
authored
fix VB snippet issues
* add missing letter * fix tag 1
1 parent b2cb36b commit 249889f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

snippets/visualbasic/VS_Snippets_Remoting/NclSslClientSync/VB/clientsync.vb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
' NclSslClientSync
22
'<snippet0>
3-
mports System.Collections
3+
Imports System.Collections
44
Imports System.Net
55
Imports System.Net.Security
66
Imports System.Net.Sockets
@@ -14,7 +14,6 @@ Namespace Examples.System.Net
1414
Public Class SslTcpClient
1515

1616
' <snippet1>
17-
1817
' The following method is invoked by the RemoteCertificateValidationDelegate.
1918
Public Shared Function ValidateServerCertificate(
2019
sender As Object,
@@ -78,8 +77,8 @@ Namespace Examples.System.Net
7877
Console.WriteLine("Client closed.")
7978
End Sub
8079
'</snippet3>
80+
8181
'<snippet6>
82-
8382
Private Shared Function ReadMessage(sslStream As SslStream) As String
8483

8584
' Read the message sent by the server.

snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Namespace Examples.System.Net
3030
ProcessClient(client)
3131
End While
3232
End Sub
33-
'<snippet1
33+
'<snippet1>
3434
Private Shared Sub ProcessClient(client As TcpClient)
3535
' A client has connected. Create the
3636
' SslStream using the client's network stream.
@@ -108,8 +108,8 @@ Namespace Examples.System.Net
108108

109109
Return messageData.ToString()
110110
End Function
111-
112111
' </snippet2>
112+
113113
' <snippet3>
114114
Private Shared Sub DisplaySecurityLevel(stream As SslStream)
115115
Console.WriteLine("Cipher: {0} strength {1}", stream.CipherAlgorithm, stream.CipherStrength)
@@ -118,21 +118,22 @@ Namespace Examples.System.Net
118118
Console.WriteLine("Protocol: {0}", stream.SslProtocol)
119119
End Sub
120120
'</snippet3>
121-
'<snippet4>
122121

122+
'<snippet4>
123123
Private Shared Sub DisplaySecurityServices(stream As SslStream)
124124
Console.WriteLine("Is authenticated: {0} as server? {1}", stream.IsAuthenticated, stream.IsServer)
125125
Console.WriteLine("IsSigned: {0}", stream.IsSigned)
126126
Console.WriteLine("Is Encrypted: {0}", stream.IsEncrypted)
127127
End Sub
128128
' </snippet4>
129+
129130
' <snippet5>
130131
Private Shared Sub DisplayStreamProperties(stream As SslStream)
131132
Console.WriteLine("Can read: {0}, write {1}", stream.CanRead, stream.CanWrite)
132133
Console.WriteLine("Can timeout: {0}", stream.CanTimeout)
133134
End Sub
134-
135135
' </snippet5>
136+
136137
' <snippet6>
137138
Private Shared Sub DisplayCertificateInformation(stream As SslStream)
138139
Console.WriteLine("Certificate revocation list checked: {0}", stream.CheckCertRevocationStatus)
@@ -153,8 +154,8 @@ Namespace Examples.System.Net
153154
Console.WriteLine("Remote certificate is null.")
154155
End If
155156
End Sub
156-
157157
' </snippet6>
158+
158159
Private Shared Sub DisplayUsage()
159160
Console.WriteLine("To start the server specify:")
160161
Console.WriteLine("serverSync certificateFile.cer")

0 commit comments

Comments
 (0)