DiscoveryDocumentReference.ResolveAll 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
모든 참조된 문서가 해당 검색 문서 내에 있는지 여부를 확인합니다.
public:
void ResolveAll();
public void ResolveAll ();
member this.ResolveAll : unit -> unit
Public Sub ResolveAll ()
예외
예제
using System;
using System.Web.Services.Discovery;
using System.Collections;
using System.Security.Permissions;
class DiscoveryDocumentReference_Document_ResolveAll
{
static void Main()
{
Run();
}
[PermissionSetAttribute(SecurityAction.Demand, Name="FullTrust")]
static void Run()
{
try
{
string myUrl = "http://localhost/Sample_cs.vsdisco";
DiscoveryClientProtocol myProtocol = new DiscoveryClientProtocol();
// Get the discovery document myDiscoveryDocument.
DiscoveryDocument myDiscoveryDocument = myProtocol.Discover(myUrl);
// Get the references of myDiscoveryDocument.
IEnumerator myEnumerator = myDiscoveryDocument.References.GetEnumerator();
while(myEnumerator.MoveNext())
{
DiscoveryDocumentReference myNewReference =
(DiscoveryDocumentReference)myEnumerator.Current;
// Set the ClientProtocol of myNewReference.
DiscoveryClientProtocol myNewProtocol = myNewReference.ClientProtocol;
// Verify for all the valid references.
myNewReference.ResolveAll();
// Get the document of myNewReference.
DiscoveryDocument myNewDiscoveryDocument =
myNewReference.Document;
IEnumerator myNewEnumerator =
myNewDiscoveryDocument.References.GetEnumerator();
Console.WriteLine("The valid discovery document is : \n");
while(myNewEnumerator.MoveNext())
{
// Display the references of myNewDiscoveryDocument on the console.
Console.WriteLine(((DiscoveryDocumentReference)myNewEnumerator.Current).Ref);
}
}
}
catch(Exception e)
{
Console.WriteLine("Exception :{0}", e.Message);
}
}
}
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
설명
개체의 개별 참조를 구체적으로 확인해야 하는 경우가 아니면 개체의 DiscoveryDocumentReference 메서드 또는 ResolveOneLevel 메서드DiscoveryClientProtocol를 ResolveAll 호출해야 합니다.
이 메서드는 검색 문서, XSD 스키마 및 서비스 설명 References 에 ClientProtocol 대한 모든 참조와 참조 검색 문서에 있는 모든 참조를 확인합니다.