DiscoveryClientReferenceCollection 클래스

정의

DiscoveryReference 개체의 컬렉션을 나타냅니다. 이 클래스는 상속될 수 없습니다.

public ref class DiscoveryClientReferenceCollection sealed : System::Collections::DictionaryBase
public sealed class DiscoveryClientReferenceCollection : System.Collections.DictionaryBase
type DiscoveryClientReferenceCollection = class
    inherit DictionaryBase
Public NotInheritable Class DiscoveryClientReferenceCollection
Inherits DictionaryBase
상속
DiscoveryClientReferenceCollection

예제

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

using namespace System;
using namespace System::Net;
using namespace System::Collections;
using namespace System::Web::Services::Discovery;

int main()
{
   DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol;
   myDiscoveryClientProtocol->Credentials = CredentialCache::DefaultCredentials;
   
   // 'dataservice.vsdisco' is a sample discovery document.
   String^ myStringUrl = "http://localhost/dataservice.vsdisco";
   
   // Call the Discover method to populate the References property.
   DiscoveryDocument^ myDiscoveryDocument = myDiscoveryClientProtocol->Discover( myStringUrl );
   
   // Resolve all references found in the discovery document.
   myDiscoveryClientProtocol->ResolveAll();
   DiscoveryClientReferenceCollection^ myDiscoveryClientReferenceCollection = myDiscoveryClientProtocol->References;
   
   // Retrieve the keys from the collection.
   ICollection^ myCollection = myDiscoveryClientReferenceCollection->Keys;
   array<Object^>^myObjectCollection = gcnew array<Object^>(myDiscoveryClientReferenceCollection->Count);
   myCollection->CopyTo( myObjectCollection, 0 );
   Console::WriteLine( "The discovery documents, service descriptions, and XML schema" );
   Console::WriteLine( " definitions in the collection are: " );
   for ( int i = 0; i < myObjectCollection->Length; i++ )
   {
      Console::WriteLine( myObjectCollection[ i ] );
   }
   Console::WriteLine( "" );
   
   // Retrieve the values from the collection.
   ICollection^ myCollection1 = myDiscoveryClientReferenceCollection->Values;
   array<Object^>^myObjectCollection1 = gcnew array<Object^>(myDiscoveryClientReferenceCollection->Count);
   myCollection1->CopyTo( myObjectCollection1, 0 );
   Console::WriteLine( "The objects in the collection are: " );
   for ( int i = 0; i < myObjectCollection1->Length; i++ )
   {
      Console::WriteLine( myObjectCollection1[ i ] );
   }
   Console::WriteLine( "" );
   String^ myStringUrl1 = "http://localhost/dataservice.vsdisco";
   if ( myDiscoveryClientReferenceCollection->Contains( myStringUrl1 ) )
   {
      Console::WriteLine( "The document reference {0} is part of the collection.", myStringUrl1 );
   }
}
using System;
using System.Net;
using System.Collections;
using System.Security.Permissions;
using System.Web.Services.Discovery;

class MyDiscoveryClientReferenceCollection
{
   static void Main()
   {
      Run();
   }

   [PermissionSetAttribute(SecurityAction.Demand, Name="FullTrust")]
   static void Run()
   {
      DiscoveryClientProtocol myDiscoveryClientProtocol =
          new DiscoveryClientProtocol();

      myDiscoveryClientProtocol.Credentials =
          CredentialCache.DefaultCredentials;

      // 'dataservice.vsdisco' is a sample discovery document.
      string myStringUrl = "http://localhost/dataservice.vsdisco";

      // Call the Discover method to populate the References property.
      DiscoveryDocument myDiscoveryDocument =
          myDiscoveryClientProtocol.Discover(myStringUrl);

      // Resolve all references found in the discovery document.
      myDiscoveryClientProtocol.ResolveAll();

      DiscoveryClientReferenceCollection myDiscoveryClientReferenceCollection =
          myDiscoveryClientProtocol.References;

      // Retrieve the keys from the collection.
      ICollection myCollection = myDiscoveryClientReferenceCollection.Keys;
      object[] myObjectCollection =
          new object[myDiscoveryClientReferenceCollection.Count];
      myCollection.CopyTo(myObjectCollection, 0);

      Console.WriteLine("The discovery documents, service descriptions, " +
            "and XML schema");
      Console.WriteLine(" definitions in the collection are: ");
      for (int i=0; i< myObjectCollection.Length; i++)
      {
         Console.WriteLine(myObjectCollection[i]);
      }
      Console.WriteLine("");

      // Retrieve the values from the collection.
      ICollection myCollection1 = myDiscoveryClientReferenceCollection.Values;
      object[] myObjectCollection1 =
          new object[myDiscoveryClientReferenceCollection.Count];
      myCollection1.CopyTo(myObjectCollection1, 0);

      Console.WriteLine("The objects in the collection are: ");
      for (int i=0; i< myObjectCollection1.Length; i++)
      {
         Console.WriteLine(myObjectCollection1[i]);
      }

      Console.WriteLine("");

      string myStringUrl1 = "http://localhost/dataservice.vsdisco";
      if (myDiscoveryClientReferenceCollection.Contains(myStringUrl1))
      {
         Console.WriteLine("The document reference {0} is part of the collection.",
             myStringUrl1);
      }
   }
}
Imports System.Net
Imports System.Collections
Imports System.Security.Permissions
Imports System.Web.Services.Discovery

Class MyDiscoveryClientReferenceCollection
   
   Shared Sub Main()
      Run()
   End Sub

   <PermissionSetAttribute(SecurityAction.Demand, Name := "FullTrust")> _
   Shared Sub Run()
      Dim myDiscoveryClientProtocol As New DiscoveryClientProtocol()
      
      myDiscoveryClientProtocol.Credentials = CredentialCache.DefaultCredentials
      
      ' 'dataservice.vsdisco' is a sample discovery document.
      Dim myStringUrl As String = "http://localhost/dataservice.vsdisco"
      
      ' Call the Discover method to populate the References property.
      Dim myDiscoveryDocument As DiscoveryDocument = _
          myDiscoveryClientProtocol.Discover(myStringUrl)
      
      ' Resolve all references found in the discovery document.
      myDiscoveryClientProtocol.ResolveAll()
      
      Dim myDiscoveryClientReferenceCollection As DiscoveryClientReferenceCollection = _ 
          myDiscoveryClientProtocol.References

      ' Retrieve the keys from the collection.
      Dim myCollection As ICollection = myDiscoveryClientReferenceCollection.Keys
      Dim myObjectCollection(myDiscoveryClientReferenceCollection.Count) As Object
      myCollection.CopyTo(myObjectCollection, 0)

      Console.WriteLine("The discovery documents, service descriptions, and XML schema")
      Console.WriteLine(" definitions in the collection are:")
      Dim i As Integer
      For i = 0 To myObjectCollection.Length - 1
          Console.WriteLine(myObjectCollection(i))
      Next i

      ' Retrieve the values from the collection.
      Dim myCollection1 As ICollection = myDiscoveryClientReferenceCollection.Values
      Dim myObjectCollection1(myDiscoveryClientReferenceCollection.Count - 1) As Object
      myCollection1.CopyTo(myObjectCollection1, 0)
      
      Console.WriteLine("The objects in the collection are:")
      For i = 0 To myObjectCollection1.Length - 1
          Console.WriteLine(myObjectCollection1(i))
      Next i
      
      
      Dim myStringUrl1 As String = "http://localhost/dataservice.vsdisco"
      If myDiscoveryClientReferenceCollection.Contains(myStringUrl1) Then
          Console.WriteLine("The document reference {0} is part of the collection.", _
              myStringUrl1)
      End If
   End Sub

End Class

설명

합니다 References 속성을 DiscoveryClientProtocol 유형의 DiscoveryClientReferenceCollection합니다.

생성자

DiscoveryClientReferenceCollection()

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

속성

Count

DictionaryBase 인스턴스에 포함된 요소 수를 가져옵니다.

(다음에서 상속됨 DictionaryBase)
Dictionary

DictionaryBase 인스턴스에 포함된 요소의 목록을 가져옵니다.

(다음에서 상속됨 DictionaryBase)
InnerHashtable

DictionaryBase 인스턴스에 포함된 요소의 목록을 가져옵니다.

(다음에서 상속됨 DictionaryBase)
Item[String]

지정된 URL의 DiscoveryReference에서 DiscoveryClientReferenceCollection 개체를 가져오거나 설정합니다.

Keys

ICollection에 있는 모든 키가 포함된 Gets an DiscoveryClientReferenceCollection 개체를 가져옵니다.

Values

ICollection에 있는 모든 값이 포함된 DiscoveryClientReferenceCollection 개체를 가져옵니다.

메서드

Add(DiscoveryReference)

DiscoveryReferenceDiscoveryClientReferenceCollection를 추가합니다.

Add(String, DiscoveryReference)

지정된 URL과 값을 가지는 DiscoveryReferenceDiscoveryClientReferenceCollection에 추가합니다.

Clear()

DictionaryBase 인스턴스의 콘텐츠를 지웁니다.

(다음에서 상속됨 DictionaryBase)
Contains(String)

DiscoveryClientReferenceCollection에 지정된 URL의 DiscoveryReference가 포함되어 있는지 여부를 확인합니다.

CopyTo(Array, Int32)

지정한 인덱스에서 1차원 DictionaryBaseArray 엔트리를 복사합니다.

(다음에서 상속됨 DictionaryBase)
Equals(Object)

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

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

IDictionaryEnumerator 인스턴스를 반복하는 DictionaryBase를 반환합니다.

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

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

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

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

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

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

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

DictionaryBase 인스턴스의 내용을 지우기 전에 추가로 사용자 지정 프로세스를 수행합니다.

(다음에서 상속됨 DictionaryBase)
OnClearComplete()

DictionaryBase 인스턴스의 내용을 지운 후에 추가로 사용자 지정 프로세스를 수행합니다.

(다음에서 상속됨 DictionaryBase)
OnGet(Object, Object)

DictionaryBase 인스턴스에서 지정한 키와 값이 있는 요소를 가져옵니다.

(다음에서 상속됨 DictionaryBase)
OnInsert(Object, Object)

DictionaryBase 인스턴스에 새 요소를 삽입하기 전에 추가로 사용자 지정 프로세스를 수행합니다.

(다음에서 상속됨 DictionaryBase)
OnInsertComplete(Object, Object)

DictionaryBase 인스턴스에 새 요소를 삽입한 후에 추가로 사용자 지정 프로세스를 수행합니다.

(다음에서 상속됨 DictionaryBase)
OnRemove(Object, Object)

DictionaryBase 인스턴스에서 요소를 제거하기 전에 추가로 사용자 지정 프로세스를 수행합니다.

(다음에서 상속됨 DictionaryBase)
OnRemoveComplete(Object, Object)

DictionaryBase 인스턴스에서 요소를 제거한 후에 추가로 사용자 지정 프로세스를 수행합니다.

(다음에서 상속됨 DictionaryBase)
OnSet(Object, Object, Object)

DictionaryBase 인스턴스에 값을 설정하기 전에 추가로 사용자 지정 프로세스를 수행합니다.

(다음에서 상속됨 DictionaryBase)
OnSetComplete(Object, Object, Object)

DictionaryBase 인스턴스에 값을 설정한 후에 추가로 사용자 지정 프로세스를 수행합니다.

(다음에서 상속됨 DictionaryBase)
OnValidate(Object, Object)

지정한 키와 값을 가지는 요소의 유효성을 검사할 때 추가로 사용자 지정 프로세스를 수행합니다.

(다음에서 상속됨 DictionaryBase)
Remove(String)

DiscoveryReference에서 지정된 URL의 DiscoveryClientReferenceCollection를 제거합니다.

ToString()

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

(다음에서 상속됨 Object)

명시적 인터페이스 구현

ICollection.IsSynchronized

DictionaryBase 개체에 대한 액세스가 동기화되어 스레드로부터 안전하게 보호되는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 DictionaryBase)
ICollection.SyncRoot

DictionaryBase 개체에 대한 액세스를 동기화하는 데 사용할 수 있는 개체를 가져옵니다.

(다음에서 상속됨 DictionaryBase)
IDictionary.Add(Object, Object)

지정한 키와 값을 가지는 요소를 DictionaryBase에 추가합니다.

(다음에서 상속됨 DictionaryBase)
IDictionary.Contains(Object)

DictionaryBase에 특정 키가 들어 있는지 여부를 확인합니다.

(다음에서 상속됨 DictionaryBase)
IDictionary.IsFixedSize

DictionaryBase 개체의 크기가 고정되어 있는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 DictionaryBase)
IDictionary.IsReadOnly

DictionaryBase 개체가 읽기 전용인지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 DictionaryBase)
IDictionary.Item[Object]

지정된 키에 연결된 값을 가져오거나 설정합니다.

(다음에서 상속됨 DictionaryBase)
IDictionary.Keys

ICollection 개체의 키가 포함된 DictionaryBase 개체를 가져옵니다.

(다음에서 상속됨 DictionaryBase)
IDictionary.Remove(Object)

DictionaryBase에서 키가 지정된 요소를 제거합니다.

(다음에서 상속됨 DictionaryBase)
IDictionary.Values

ICollection 개체의 값이 포함된 DictionaryBase 개체를 가져옵니다.

(다음에서 상속됨 DictionaryBase)
IEnumerable.GetEnumerator()

IEnumerator를 반복하는 DictionaryBase를 반환합니다.

(다음에서 상속됨 DictionaryBase)

확장 메서드

Cast<TResult>(IEnumerable)

IEnumerable의 요소를 지정된 형식으로 캐스팅합니다.

OfType<TResult>(IEnumerable)

지정된 형식에 따라 IEnumerable의 요소를 필터링합니다.

AsParallel(IEnumerable)

쿼리를 병렬화할 수 있도록 합니다.

AsQueryable(IEnumerable)

IEnumerableIQueryable로 변환합니다.

적용 대상