EndpointCollectionElement.TryAdd 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當以衍生類別實作時,會將指定的端點加入組態檔案中的服務端點集合中。
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
參數
- name
- String
包含該端點集合的服務端點名稱。
- endpoint
- ServiceEndpoint
要加入集合的服務端點元素。
- config
- Configuration
接收服務端點的設定檔。
傳回
true如果端點在設定檔中被加入集合;否則,。 false