DiscoveryClientResult 클래스

정의

참조된 문서의 내용 없이 검색 참조의 자세한 내용을 나타냅니다. 이 클래스는 상속될 수 없습니다.

public ref class DiscoveryClientResult sealed
public sealed class DiscoveryClientResult
type DiscoveryClientResult = class
Public NotInheritable Class DiscoveryClientResult
상속
DiscoveryClientResult

예제

#using <System.Web.Services.dll>
#using <System.dll>

using namespace System;
using namespace System::Web::Services::Discovery;
int main()
{
   try
   {
      DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol;
      
      // Get the collection holding DiscoveryClientResult objects.
      DiscoveryClientResultCollection^ myDiscoveryClientResultCollection = myDiscoveryClientProtocol->ReadAll( "results.discomap" );
      Console::WriteLine( "The number of DiscoveryClientResult objects: {0}", myDiscoveryClientResultCollection->Count );
      Console::WriteLine( "Displaying the items in the collection:" );
      
      // Iterate through the collection and display the properties
      // of each DiscoveryClientResult in it.
      System::Collections::IEnumerator^ myEnum = myDiscoveryClientResultCollection->GetEnumerator();
      while ( myEnum->MoveNext() )
      {
         DiscoveryClientResult^ myDiscoveryClientResult = safe_cast<DiscoveryClientResult^>(myEnum->Current);
         Console::WriteLine( "Type of reference in the discovery document: {0}", myDiscoveryClientResult->ReferenceTypeName );
         Console::WriteLine( "Url for the reference: {0}", myDiscoveryClientResult->Url );
         Console::WriteLine( "File for saving the reference: {0}", myDiscoveryClientResult->Filename );
      }
   }
   catch ( Exception^ e ) 
   {
      Console::WriteLine( "Error is {0}", e->Message );
   }

}
using System;
using System.Web.Services.Discovery;
public class MyDiscoveryClientResult
{
    static void Main()
    {
        try
        {
            DiscoveryClientProtocol myDiscoveryClientProtocol =
                new DiscoveryClientProtocol();

            // Get the collection holding DiscoveryClientResult objects.
            DiscoveryClientResultCollection myDiscoveryClientResultCollection =
                myDiscoveryClientProtocol.ReadAll("results.discomap");
            Console.WriteLine("The number of DiscoveryClientResult objects: "
                + myDiscoveryClientResultCollection.Count);
            Console.WriteLine("Displaying the items in the collection:");

            // Iterate through the collection and display the properties
            // of each DiscoveryClientResult in it.
            foreach(DiscoveryClientResult myDiscoveryClientResult in
                myDiscoveryClientResultCollection)
            {
                Console.WriteLine(
                    "Type of reference in the discovery document: "
                    + myDiscoveryClientResult.ReferenceTypeName);
                Console.WriteLine("Url for the reference: "
                    + myDiscoveryClientResult.Url);
                Console.WriteLine("File for saving the reference: "
                    + myDiscoveryClientResult.Filename);
            }
        }
        catch(Exception e)
        {
            Console.WriteLine("Error is " + e.Message);
        }
    }
}
Imports System.Web.Services.Discovery

Public Class MyDiscoveryClientResult

    Shared Sub Main()
        Try
            Dim myDiscoveryClientProtocol As New DiscoveryClientProtocol()

            ' Get the collection holding DiscoveryClientResult objects.
            Dim myDiscoveryClientResultCollection As _
                DiscoveryClientResultCollection = _
                myDiscoveryClientProtocol.ReadAll("results.discomap")
            Console.WriteLine("The number of DiscoveryClientResult objects: " _
                & myDiscoveryClientResultCollection.Count.ToString())
            Console.WriteLine("Displaying the items in the collection:")

            ' Iterate through the collection and display the properties
            ' of each DiscoveryClientResult in it.
            Dim myDiscoveryClientResult As DiscoveryClientResult
            For Each myDiscoveryClientResult In myDiscoveryClientResultCollection
                Console.WriteLine( _
                    "Type of reference in the discovery document: " _
                    & myDiscoveryClientResult.ReferenceTypeName)
                Console.WriteLine("Url for the reference: " _
                    & myDiscoveryClientResult.Url)
                Console.WriteLine("File for saving the reference: " _
                    & myDiscoveryClientResult.Filename)
            Next myDiscoveryClientResult
        Catch e As Exception
            Console.WriteLine("Error is " + e.Message)
        End Try
    End Sub
End Class

설명

사용 하 여는 WriteAll 메서드의 DiscoveryClientProtocol, 모든 저장 문서의 맵을 포함 하는 파일과 모든 유효한 참조 문서를 작성할 수 있습니다 디스크에 있습니다. 저장 된 모든 문서의 맵을 포함 하는 파일의 속성에 의해 요약 된 것 처럼 각 문서의 세부 정보를 포함 DiscoveryClientResult합니다.

참조 된 문서와 참조 된 문서의 맵을 사용 하 여 디스크에 기록 된 후의 WriteAll 메서드를 호출할 수 있습니다는 ReadAll 검색 문서를 참조 하는 방법입니다.

생성자

DiscoveryClientResult()

DiscoveryClientResult 클래스의 새 인스턴스를 초기화합니다.

DiscoveryClientResult(Type, String, String)

DiscoveryClientResult 클래스의 새 인스턴스를 초기화하고, ReferenceTypeName, UrlFilename 속성을 각각 referenceType, urlfilename으로 설정합니다.

속성

Filename

해당 참조가 저장되는 파일의 이름을 가져오거나 설정합니다.

ReferenceTypeName

검색 문서에 있는 참조의 형식을 나타내는 클래스의 이름입니다.

Url

해당 참조에 대한 URL을 가져오거나 설정합니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상