次の方法で共有


DiscoveryClientReferenceCollection.Item[String] プロパティ

定義

指定した URL の DiscoveryReference から DiscoveryClientReferenceCollection オブジェクトを取得または設定します。

public:
 property System::Web::Services::Discovery::DiscoveryReference ^ default[System::String ^] { System::Web::Services::Discovery::DiscoveryReference ^ get(System::String ^ url); void set(System::String ^ url, System::Web::Services::Discovery::DiscoveryReference ^ value); };
public System.Web.Services.Discovery.DiscoveryReference this[string url] { get; set; }
member this.Item(string) : System.Web.Services.Discovery.DiscoveryReference with get, set
Default Public Property Item(url As String) As DiscoveryReference

パラメーター

url
String

DiscoveryReference から取得または設定する DiscoveryClientReferenceCollection の URL。

プロパティ値

DiscoveryReference

探索ドキュメントへの参照を表す DiscoveryReference

DiscoveryClientReferenceCollection^ myDiscoveryClientReferenceCollection = gcnew DiscoveryClientReferenceCollection;
ContractReference^ myContractReference = gcnew ContractReference;
String^ myStringUrl1 = "http://www.contoso.com/service1.disco";
myContractReference->Ref = myStringUrl1;
myDiscoveryClientReferenceCollection->Add( myContractReference );

// myDiscoveryClientReferenceCollection is an instance collection.
Object^ myObject = myDiscoveryClientReferenceCollection[ myStringUrl1 ];
Console::WriteLine( "Object representing the URL: {0}", myObject );
DiscoveryClientReferenceCollection myDiscoveryClientReferenceCollection =
    new DiscoveryClientReferenceCollection();

ContractReference myContractReference = new ContractReference();
string myStringUrl1 = "http://www.contoso.com/service1.disco";
myContractReference.Ref = myStringUrl1;
myDiscoveryClientReferenceCollection.Add(myContractReference);

// myDiscoveryClientReferenceCollection is an instance collection.
object myObject = myDiscoveryClientReferenceCollection[myStringUrl1];
Console.WriteLine("Object representing the URL: " + myObject.ToString());

Dim myDiscoveryClientReferenceCollection As _
    New DiscoveryClientReferenceCollection()

Dim myContractReference As New ContractReference()
Dim myStringUrl1 As String = "http://www.contoso.com/service1.disco"
myContractReference.Ref = myStringUrl1
myDiscoveryClientReferenceCollection.Add(myContractReference)
' myDiscoveryClientReferenceCollection is an instance collection.
Dim myObject As Object = _
    myDiscoveryClientReferenceCollection.Item(myStringUrl1)
Console.WriteLine("Object representing the URL: " + myObject.ToString())

適用対象