DiscoveryClientDocumentCollection.Remove Method (String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Removes an object with the specified URL from the DiscoveryClientDocumentCollection.

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

public void Remove(
	string url
)

Parameters

url
Type: System.String

The URL for the discovered document to remove from the DiscoveryClientDocumentCollection.

Exception Condition
ArgumentNullException

url is null.

The following code example removes the discovery document with a URL of http://www.contoso.com/service1.disco from the DiscoveryClientDocumentCollection.

DiscoveryClientDocumentCollection myDiscoveryClientDocumentCollection = 
   new DiscoveryClientDocumentCollection();
DiscoveryDocument myDiscoveryDocument = new DiscoveryDocument();
string myStringUrl = "http://www.contoso.com/service.disco";
string myStringUrl1 = "http://www.contoso.com/service1.disco";

myDiscoveryClientDocumentCollection.Add(myStringUrl, myDiscoveryDocument);
myDiscoveryClientDocumentCollection.Add(myStringUrl1, myDiscoveryDocument);
myDiscoveryClientDocumentCollection.Remove(myStringUrl1);

.NET Framework
Available since 1.1
Return to top
Show: