本文整理匯總了VB.NET中System.Web.Services.Discovery.DiscoveryDocumentReference.ResolveAll方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET DiscoveryDocumentReference.ResolveAll方法的具體用法?VB.NET DiscoveryDocumentReference.ResolveAll怎麽用?VB.NET DiscoveryDocumentReference.ResolveAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Web.Services.Discovery.DiscoveryDocumentReference
的用法示例。
在下文中一共展示了DiscoveryDocumentReference.ResolveAll方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: DiscoveryDocumentReference_Document_ResolveAll
' 導入命名空間
Imports System.Web.Services.Discovery
Imports System.Collections
Imports System.Security.Permissions
Class DiscoveryDocumentReference_Document_ResolveAll
Shared Sub Main()
Run()
End Sub
<PermissionSetAttribute(SecurityAction.Demand, Name := "FullTrust")> _
Shared Sub Run()
Try
Dim myUrl As String = "http://localhost/Sample_vb.vsdisco"
Dim myProtocol As New DiscoveryClientProtocol()
' Get the discovery document myDiscoveryDocument.
Dim myDiscoveryDocument As DiscoveryDocument = myProtocol.Discover(myUrl)
' Get the references of myDiscoveryDocument.
Dim myEnumerator As IEnumerator = myDiscoveryDocument.References.GetEnumerator()
While myEnumerator.MoveNext()
Dim myNewReference As DiscoveryDocumentReference = _
CType(myEnumerator.Current, DiscoveryDocumentReference)
' Set the ClientProtocol of myNewReference.
Dim myNewProtocol As DiscoveryClientProtocol = myNewReference.ClientProtocol
' Verify for all the valid references.
myNewReference.ResolveAll()
' Get the document of myNewReference.
Dim myNewDiscoveryDocument As DiscoveryDocument = myNewReference.Document
Dim myNewEnumerator As IEnumerator = _
myNewDiscoveryDocument.References.GetEnumerator()
Console.WriteLine("The valid discovery document is : " + ControlChars.NewLine)
While myNewEnumerator.MoveNext()
' Display the references of myNewDiscoveryDocument on the console.
Console.WriteLine(CType(myNewEnumerator.Current, DiscoveryDocumentReference).Ref)
End While
End While
Catch e As Exception
Console.WriteLine("Exception :{0}", e.Message)
End Try
End Sub
End Class
開發者ID:VB.NET開發者,項目名稱:System.Web.Services.Discovery,代碼行數:43,代碼來源:DiscoveryDocumentReference.ResolveAll