DiscoveryClientReferenceCollection.Item Property (String)

 

Gets or sets a DiscoveryReference object from the DiscoveryClientReferenceCollection with the specified URL.

Namespace:   System.Web.Services.Discovery
Assembly:  System.Web.Services (in System.Web.Services.dll)

public DiscoveryReference this[
	string url
] { get; set; }

Parameters

url
Type: System.String

The URL for the DiscoveryReference to get or set from the DiscoveryClientReferenceCollection.

Property Value

Type: System.Web.Services.Discovery.DiscoveryReference

An DiscoveryReference representing a reference to a discovery document.

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

.NET Framework
Available since 1.1
Return to top
Show: