DiscoveryClientDocumentCollection.Remove(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從 DiscoveryClientDocumentCollection 移除有指定 URL 的物件。
public:
void Remove(System::String ^ url);
public void Remove (string url);
member this.Remove : string -> unit
Public Sub Remove (url As String)
參數
- url
- String
探索文件的 URL,此文件要從 DiscoveryClientDocumentCollection 中移除。
例外狀況
url
為 null
。
範例
下列程式碼範例會從 移除具有 的 http://www.contoso.com/service1.disco
URL 的 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)