DiscoveryDocumentReference.Document 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
참조된 검색 문서의 콘텐츠를 DiscoveryDocument 개체로서 가져옵니다.
public:
property System::Web::Services::Discovery::DiscoveryDocument ^ Document { System::Web::Services::Discovery::DiscoveryDocument ^ get(); };
public System.Web.Services.Discovery.DiscoveryDocument Document { get; }
member this.Document : System.Web.Services.Discovery.DiscoveryDocument
Public ReadOnly Property Document As DiscoveryDocument
속성 값
참조된 검색 문서의 콘텐츠를 나타내는 DiscoveryDocument입니다.
예외
ClientProtocol 속성이 null
인 경우
또는 ClientProtocol을 사용하여 XSD 스키마를 다운로드하거나 확인하는 동안 오류가 발생한 경우
예제
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);
}
}
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
설명
검색 문서를 다운로드하여 속성ClientProtocol에 Documents 추가하지 않은 경우 문서를 다운로드하고 확인하려고 시도합니다.