Aracılığıyla paylaş


DiscoveryClientDocumentCollection.Remove(String) Yöntem

Tanım

belirtilen URL'ye sahip bir nesneyi öğesinden DiscoveryClientDocumentCollectionkaldırır.

public:
 void Remove(System::String ^ url);
public void Remove (string url);
member this.Remove : string -> unit
Public Sub Remove (url As String)

Parametreler

url
String

Bulunan belgenin URL'si içinden DiscoveryClientDocumentCollectionkaldırılacak.

Özel durumlar

url, null değeridir.

Örnekler

Aşağıdaki kod örneği, url'si http://www.contoso.com/service1.disco olan bulma belgesini konumundan DiscoveryClientDocumentCollectionkaldırır.

DiscoveryClientDocumentCollection^ myDiscoveryClientDocumentCollection = gcnew DiscoveryClientDocumentCollection;

DiscoveryDocument^ myDiscoveryDocument = gcnew 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 );
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);
Dim myDiscoveryClientDocumentCollection As New DiscoveryClientDocumentCollection()
Dim myDiscoveryDocument As New DiscoveryDocument()
Dim myStringUrl As String = "http://www.contoso.com/service.disco"
Dim myStringUrl1 As String = "http://www.contoso.com/service1.disco"

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

Şunlara uygulanır

Ayrıca bkz.