DiscoveryClientReferenceCollection.Item Property
.NET Framework 2.0
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)
Assembly: System.Web.Services (in system.web.services.dll)
public: property DiscoveryReference^ default [String^] { DiscoveryReference^ get (String^ url); void set (String^ url, DiscoveryReference^ value); }
/** @property */ public DiscoveryReference get_Item (String url) /** @property */ public void set_Item (String url, DiscoveryReference value)
Not applicable.
Parameters
- url
The URL for the DiscoveryReference to get or set from the DiscoveryClientReferenceCollection.
Property Value
An DiscoveryReference representing a reference to a discovery document.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.set_Ref(myStringUrl1);
myDiscoveryClientReferenceCollection.Add(myContractReference);
// myDiscoveryClientReferenceCollection is an instance collection.
Object myObject = myDiscoveryClientReferenceCollection.
get_Item(myStringUrl1);
Console.WriteLine("Object representing the URL: "
+ myObject.ToString());
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: