DiscoveryClientReferenceCollection のすべてのキーを保持している System.Collections.ICollection オブジェクトを取得します。
Public ReadOnly Property Keys As ICollection
[C#]
public ICollection Keys {get;}
[C++]
public: __property ICollection* get_Keys();
[JScript]
public function get Keys() : ICollection;
プロパティ値
DiscoveryClientReferenceCollection のキーを保持している ICollection 。
使用例
Dim myDiscoveryClientProtocol As New DiscoveryClientProtocol()
myDiscoveryClientProtocol.Credentials = _
CredentialCache.DefaultCredentials
' 'dataservice.disco' is a sample discovery document.
Dim myStringUrl As String = "https://localhost/dataservice.disco"
' 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 in 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 iIndex As Integer
For iIndex = 0 To myObjectCollection.Length - 1
Console.WriteLine(myObjectCollection(iIndex))
Next iIndex
[C#]
DiscoveryClientProtocol myDiscoveryClientProtocol =
new DiscoveryClientProtocol();
myDiscoveryClientProtocol.Credentials =
CredentialCache.DefaultCredentials;
// 'dataservice.disco' is a sample discovery document.
string myStringUrl = "https://localhost/dataservice.disco";
// 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 in 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 iIndex=0; iIndex < myObjectCollection.Length; iIndex++)
{
Console.WriteLine(myObjectCollection[iIndex]);
}
[C++]
DiscoveryClientProtocol* myDiscoveryClientProtocol = new DiscoveryClientProtocol();
myDiscoveryClientProtocol->Credentials =
CredentialCache::DefaultCredentials;
// 'dataservice.disco' is a sample discovery document.
String* myStringUrl = S"https://localhost/dataservice.disco";
// 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 in the collection.
ICollection* myCollection = myDiscoveryClientReferenceCollection->Keys;
Object* myObjectCollection[] =
new Object*[myDiscoveryClientReferenceCollection->Count];
myCollection->CopyTo(myObjectCollection, 0);
Console::WriteLine(S"The discovery documents, service descriptions, and XML schema");
Console::WriteLine(S" definitions in the collection are:");
for (int iIndex=0; iIndex < myObjectCollection->Length; iIndex++) {
Console::WriteLine(myObjectCollection->Item[iIndex]);
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
DiscoveryClientReferenceCollection クラス | DiscoveryClientReferenceCollection メンバ | System.Web.Services.Discovery 名前空間