Udostępnij za pośrednictwem


DiscoveryClientDocumentCollection.Remove(String) Metoda

Definicja

Usuwa obiekt z określonym adresem URL z obiektu DiscoveryClientDocumentCollection.

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

Parametry

url
String

Adres URL odnalezionego dokumentu do usunięcia z elementu DiscoveryClientDocumentCollection.

Wyjątki

url to null.

Przykłady

Poniższy przykład kodu usuwa dokument odnajdywania z adresu URL http://www.contoso.com/service1.disco elementu DiscoveryClientDocumentCollection.

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)

Dotyczy

Zobacz też