다음을 통해 공유


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())

적용 대상