DiscoveryClientDocumentCollection.Add(String, Object) Yöntem

Tanım

öğesine belirtilen URL'ye DiscoveryClientDocumentCollectionsahip bir nesne ekler.

C#
public void Add (string url, object value);

Parametreler

url
String

Belgeye eklenecek belgenin URL'si DiscoveryClientDocumentCollection.

value
Object

öğesine eklenecek DiscoveryClientDocumentCollectionbulunan bir belge.

Özel durumlar

url, null değeridir.

anahtarına url sahip bir giriş içinde DiscoveryClientDocumentCollectionzaten var.

Örnekler

Aşağıdaki kod örneği bir DiscoveryClientDocumentCollectionöğesine iki bulma belgesi ekler.

C#
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);

Şunlara uygulanır

Ürün Sürümler
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Ayrıca bkz.