EndpointCollectionElement.TryAdd Methode

Definitie

Wanneer het is geïmplementeerd in een afgeleide klasse, voegt u het opgegeven eindpunt toe aan de verzameling service-eindpunten in een configuratiebestand.

protected public:
 abstract bool TryAdd(System::String ^ name, System::ServiceModel::Description::ServiceEndpoint ^ endpoint, System::Configuration::Configuration ^ config);
protected internal abstract bool TryAdd(string name, System.ServiceModel.Description.ServiceEndpoint endpoint, System.Configuration.Configuration config);
abstract member TryAdd : string * System.ServiceModel.Description.ServiceEndpoint * System.Configuration.Configuration -> bool
Protected Friend MustOverride Function TryAdd (name As String, endpoint As ServiceEndpoint, config As Configuration) As Boolean

Parameters

name
String

De naam van het service-eindpunt dat de eindpuntverzameling bevat.

endpoint
ServiceEndpoint

Het service-eindpuntelement dat moet worden toegevoegd aan de verzameling.

config
Configuration

Het configuratiebestand dat het service-eindpunt ontvangt.

Retouren

true als het eindpunt wordt toegevoegd aan de verzameling in het configuratiebestand; anders, false.

Van toepassing op