DiscoveryClientDocumentCollection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
클라이언트에 다운로드한 XML Web services 검색 중에 발견된 문서의 컬렉션을 나타냅니다. 이 클래스는 상속될 수 없습니다.
public ref class DiscoveryClientDocumentCollection sealed : System::Collections::DictionaryBase
public sealed class DiscoveryClientDocumentCollection : System.Collections.DictionaryBase
type DiscoveryClientDocumentCollection = class
inherit DictionaryBase
Public NotInheritable Class DiscoveryClientDocumentCollection
Inherits DictionaryBase
- 상속
예제
다음 코드 예제는 XML 웹 서비스 검색을 시행 하 고 클라이언트에 검색 된 문서를 다운로드 합니다. 내에서 검색 문서의 이름을 DiscoveryClientDocumentCollection 콘솔에 출력 됩니다.
#using <System.dll>
#using <System.Web.Services.dll>
using namespace System;
using namespace System::Net;
using namespace System::IO;
using namespace System::Collections;
using namespace System::Web::Services::Discovery;
int main()
{
DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol;
myDiscoveryClientProtocol->Credentials = CredentialCache::DefaultCredentials;
// 'dataservice.disco' is a sample discovery document.
String^ myStringUrl = "http://localhost/dataservice.disco";
// 'Discover' method is called to populate the 'Documents' property.
DiscoveryDocument^ myDiscoveryDocument =
myDiscoveryClientProtocol->Discover( myStringUrl );
// An instance of the 'DiscoveryClientDocumentCollection' class is created.
DiscoveryClientDocumentCollection^ myDiscoveryClientDocumentCollection =
myDiscoveryClientProtocol->Documents;
// 'Keys' in the collection are retrieved.
ICollection^ myCollection = myDiscoveryClientDocumentCollection->Keys;
array<Object^>^myObjectCollection =
gcnew array<Object^>(myDiscoveryClientDocumentCollection->Count);
myCollection->CopyTo( myObjectCollection, 0 );
Console::WriteLine( "The discovery documents in the collection are :" );
for ( int iIndex = 0; iIndex < myObjectCollection->Length; iIndex++ )
{
Console::WriteLine( myObjectCollection[ iIndex ] );
}
Console::WriteLine( "" );
// 'Values' in the collection are retrieved.
ICollection^ myCollection1 = myDiscoveryClientDocumentCollection->Values;
array<Object^>^myObjectCollection1 =
gcnew array<Object^>(myDiscoveryClientDocumentCollection->Count);
myCollection1->CopyTo( myObjectCollection1, 0 );
Console::WriteLine( "The objects in the collection are :" );
for ( int iIndex = 0; iIndex < myObjectCollection1->Length; iIndex++ )
{
Console::WriteLine( myObjectCollection1[ iIndex ] );
}
}
using System;
using System.Net;
using System.IO;
using System.Collections;
using System.Security.Permissions;
using System.Web.Services.Discovery;
class DiscoveryClientDocumentCollectionSample
{
static void Main()
{
Run();
}
[PermissionSetAttribute(SecurityAction.Demand, Name="FullTrust")]
static void Run()
{
DiscoveryClientProtocol myDiscoveryClientProtocol =
new DiscoveryClientProtocol();
myDiscoveryClientProtocol.Credentials = CredentialCache.DefaultCredentials;
// 'dataservice.disco' is a sample discovery document.
string myStringUrl = "http://localhost/dataservice.disco";
// 'Discover' method is called to populate the 'Documents' property.
DiscoveryDocument myDiscoveryDocument =
myDiscoveryClientProtocol.Discover(myStringUrl);
// An instance of the 'DiscoveryClientDocumentCollection' class is created.
DiscoveryClientDocumentCollection myDiscoveryClientDocumentCollection =
myDiscoveryClientProtocol.Documents;
// 'Keys' in the collection are retrieved.
ICollection myCollection = myDiscoveryClientDocumentCollection.Keys;
object[] myObjectCollection =
new object[myDiscoveryClientDocumentCollection.Count];
myCollection.CopyTo(myObjectCollection, 0);
Console.WriteLine("The discovery documents in the collection are :");
for (int iIndex=0; iIndex < myObjectCollection.Length; iIndex++)
{
Console.WriteLine(myObjectCollection[iIndex]);
}
Console.WriteLine("");
// 'Values' in the collection are retrieved.
ICollection myCollection1 = myDiscoveryClientDocumentCollection.Values;
object[] myObjectCollection1 =
new object[myDiscoveryClientDocumentCollection.Count];
myCollection1.CopyTo(myObjectCollection1, 0);
Console.WriteLine("The objects in the collection are :");
for (int iIndex=0; iIndex < myObjectCollection1.Length; iIndex++)
{
Console.WriteLine(myObjectCollection1[iIndex]);
}
}
}
Imports System.Net
Imports System.IO
Imports System.Collections
Imports System.Security.Permissions
Imports System.Web.Services.Discovery
Class DiscoveryClientDocumentCollectionSample
Shared Sub Main()
Run()
End Sub
<PermissionSetAttribute(SecurityAction.Demand, Name := "FullTrust")> _
Shared Sub Run()
Dim myDiscoveryClientProtocol As New DiscoveryClientProtocol()
myDiscoveryClientProtocol.Credentials = CredentialCache.DefaultCredentials
' 'dataservice.disco' is a sample discovery document.
Dim myStringUrl As String = "http://localhost/dataservice.disco"
' 'Discover' method is called to populate the 'Documents' property.
Dim myDiscoveryDocument As DiscoveryDocument = myDiscoveryClientProtocol.Discover(myStringUrl)
' An instance of the 'DiscoveryClientDocumentCollection' class is created.
Dim myDiscoveryClientDocumentCollection As DiscoveryClientDocumentCollection = _
myDiscoveryClientProtocol.Documents
' 'Keys' in the collection are retrieved.
Dim myCollection As ICollection = myDiscoveryClientDocumentCollection.Keys
Dim myObjectCollection(myDiscoveryClientDocumentCollection.Count-1) As Object
myCollection.CopyTo(myObjectCollection, 0)
Console.WriteLine("The discovery documents in the collection are :")
Dim iIndex As Integer
For iIndex = 0 To myObjectCollection.Length - 1
Console.WriteLine(myObjectCollection(iIndex))
Next iIndex
Console.WriteLine("")
' 'Values' in the collection are retrieved.
Dim myCollection1 As ICollection = myDiscoveryClientDocumentCollection.Values
Dim myObjectCollection1(myDiscoveryClientDocumentCollection.Count-1) As Object
myCollection1.CopyTo(myObjectCollection1, 0)
Console.WriteLine("The objects in the collection are :")
For iIndex = 0 To myObjectCollection1.Length - 1
Console.WriteLine(myObjectCollection1(iIndex))
Next iIndex
End Sub
End Class
설명
합니다 Documents 속성을 DiscoveryClientProtocol 유형의 DiscoveryClientDocumentCollection합니다.
생성자
DiscoveryClientDocumentCollection() |
DiscoveryClientDocumentCollection 클래스의 새 인스턴스를 초기화합니다. |
속성
Count |
DictionaryBase 인스턴스에 포함된 요소 수를 가져옵니다. (다음에서 상속됨 DictionaryBase) |
Dictionary |
DictionaryBase 인스턴스에 포함된 요소의 목록을 가져옵니다. (다음에서 상속됨 DictionaryBase) |
InnerHashtable |
DictionaryBase 인스턴스에 포함된 요소의 목록을 가져옵니다. (다음에서 상속됨 DictionaryBase) |
Item[String] |
지정된 URL의 DiscoveryClientDocumentCollection에서 클라이언트 검색 문서 개체를 가져오거나 설정합니다. |
Keys |
ICollection에 있는 모든 키가 포함된 Gets an DiscoveryClientDocumentCollection 개체를 가져옵니다. |
Values |
ICollection에 있는 모든 값이 포함된 DiscoveryClientDocumentCollection 개체를 가져옵니다. |
메서드
명시적 인터페이스 구현
확장 메서드
Cast<TResult>(IEnumerable) |
IEnumerable의 요소를 지정된 형식으로 캐스팅합니다. |
OfType<TResult>(IEnumerable) |
지정된 형식에 따라 IEnumerable의 요소를 필터링합니다. |
AsParallel(IEnumerable) |
쿼리를 병렬화할 수 있도록 합니다. |
AsQueryable(IEnumerable) |
IEnumerable을 IQueryable로 변환합니다. |