DiscoveryClientDocumentCollection.Add(String, Object) Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee voegt u een object met de opgegeven URL toe aan de DiscoveryClientDocumentCollection.
public:
void Add(System::String ^ url, System::Object ^ value);
public void Add(string url, object value);
member this.Add : string * obj -> unit
Public Sub Add (url As String, value As Object)
Parameters
- url
- String
De URL voor het document dat moet worden toegevoegd aan de DiscoveryClientDocumentCollection.
- value
- Object
Een gedetecteerd document dat moet worden toegevoegd aan de DiscoveryClientDocumentCollection.
Uitzonderingen
url is null.
Er bestaat al een vermelding met een sleutel url in de DiscoveryClientDocumentCollection.
Voorbeelden
In het volgende codevoorbeeld worden twee detectiedocumenten toegevoegd aan een 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 );
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);
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)