Udostępnij za pośrednictwem


DiscoveryClientReferenceCollection.Item[String] Właściwość

Definicja

Pobiera lub ustawia DiscoveryReference obiekt z DiscoveryClientReferenceCollection określonego adresu URL.

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

Parametry

url
String

Adres URL polecenia DiscoveryReference do pobrania lub ustawienia z elementu DiscoveryClientReferenceCollection.

Wartość właściwości

DiscoveryReference

Reprezentująca DiscoveryReference odwołanie do dokumentu odnajdywania.

Przykłady

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

Dotyczy