Compartir a través de


DiscoveryClientReferenceCollection.Item[String] Propiedad

Definición

Obtiene o establece un objeto DiscoveryReference desde DiscoveryClientReferenceCollection con la dirección URL especificada.

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

Parámetros

url
String

Dirección URL para DiscoveryReference que se va a obtener o establecer desde DiscoveryClientReferenceCollection.

Valor de propiedad

DiscoveryReference representa una referencia a un documento de descubrimiento.

Ejemplos

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

Se aplica a