DiscoveryClientReferenceCollection.Keys プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ICollection のすべてのキーを保持している DiscoveryClientReferenceCollection オブジェクトを取得します。
public:
property System::Collections::ICollection ^ Keys { System::Collections::ICollection ^ get(); };
public System.Collections.ICollection Keys { get; }
member this.Keys : System.Collections.ICollection
Public ReadOnly Property Keys As ICollection
プロパティ値
ICollection のキーを保持している DiscoveryClientReferenceCollection。
例
DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol;
myDiscoveryClientProtocol->Credentials = CredentialCache::DefaultCredentials;
// 'dataservice.disco' is a sample discovery document.
String^ myStringUrl = "http://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;
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 iIndex = 0; iIndex < myObjectCollection->Length; iIndex++ )
{
Console::WriteLine( myObjectCollection[ iIndex ] );
}
DiscoveryClientProtocol myDiscoveryClientProtocol =
new DiscoveryClientProtocol();
myDiscoveryClientProtocol.Credentials =
CredentialCache.DefaultCredentials;
// 'dataservice.disco' is a sample discovery document.
string myStringUrl = "http://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]);
}
Dim myDiscoveryClientProtocol As New DiscoveryClientProtocol()
myDiscoveryClientProtocol.Credentials = _
CredentialCache.DefaultCredentials
' 'dataservice.disco' is a sample discovery document.
Dim myStringUrl As String = "http://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
適用対象
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET