DiscoveryClientReferenceCollection クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
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
- 継承
例
#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
注釈
のDiscoveryClientProtocolプロパティはReferences型DiscoveryClientReferenceCollectionです。
コンストラクター
DiscoveryClientReferenceCollection() |
DiscoveryClientReferenceCollection クラスの新しいインスタンスを初期化します。 |
プロパティ
Count |
DictionaryBase インスタンスに含まれる要素の数を取得します。 (継承元 DictionaryBase) |
Dictionary |
DictionaryBase インスタンスに格納されている要素のリストを取得します。 (継承元 DictionaryBase) |
InnerHashtable |
DictionaryBase インスタンスに格納されている要素のリストを取得します。 (継承元 DictionaryBase) |
Item[String] |
指定した URL の DiscoveryReference から DiscoveryClientReferenceCollection オブジェクトを取得または設定します。 |
Keys |
ICollection のすべてのキーを保持している DiscoveryClientReferenceCollection オブジェクトを取得します。 |
Values |
ICollection 内のすべての値を保持している DiscoveryClientReferenceCollection オブジェクトを取得します。 |
メソッド
明示的なインターフェイスの実装
拡張メソッド
Cast<TResult>(IEnumerable) |
IEnumerable の要素を、指定した型にキャストします。 |
OfType<TResult>(IEnumerable) |
指定された型に基づいて IEnumerable の要素をフィルター処理します。 |
AsParallel(IEnumerable) |
クエリの並列化を有効にします。 |
AsQueryable(IEnumerable) |
IEnumerable を IQueryable に変換します。 |