r80777 - branches/mainsoft/gh20/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.Devices

0 views
Skip to first unread message

Sasha Kogan (sashak@mainsoft.com)

unread,
Jun 26, 2007, 9:23:04 AM6/26/07
to mono-p...@lists.ximian.com, ximian....@gmail.com, mono-svn-patche...@googlegroups.com
Author: sashak
Date: 2007-06-26 09:23:03 -0400 (Tue, 26 Jun 2007)
New Revision: 80777

Modified:
branches/mainsoft/gh20/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.Devices/Network.vb
Log:
Add MonoNotSupportedAttribute to Ping() methods (that call unsupported System.Net.NetworkInformation.Ping.Send())

Modified: branches/mainsoft/gh20/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.Devices/Network.vb
===================================================================
--- branches/mainsoft/gh20/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.Devices/Network.vb 2007-06-26 12:45:52 UTC (rev 80776)
+++ branches/mainsoft/gh20/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.Devices/Network.vb 2007-06-26 13:23:03 UTC (rev 80777)
@@ -124,14 +124,18 @@
DownloadFile(address, destinationFileName, credentials, showUI, connectionTimeout, overwrite, onUserCancel)
End Sub

+ <MonoNotSupported("")> _
Public Function Ping(ByVal hostNameOrAddress As String) As Boolean
Return Ping(hostNameOrAddress, 500)
End Function

+ <MonoNotSupported("")> _
Public Function Ping(ByVal address As Uri) As Boolean
Return Ping(address.Host, 500)
End Function

+ ' Not supported, since uses unsupported System.Net.NetworkInformation.Ping.Send()
+ <MonoNotSupported("")> _
Public Function Ping(ByVal hostNameOrAddress As String, ByVal timeout As Integer) As Boolean
If IsAvailable = False Then
Throw New InvalidOperationException("Network not available.")
@@ -146,6 +150,7 @@
Return result.Status = IPStatus.Success
End Function

+ <MonoNotSupported("")> _
Public Function Ping(ByVal address As Uri, ByVal timeout As Integer) As Boolean
Return Ping(address.Host, timeout)
End Function
@@ -232,4 +237,4 @@
End Property
End Class
End Namespace
-#End If
\ No newline at end of file
+#End If

Reply all
Reply to author
Forward
0 new messages