BindingCollectionElement.TryAdd(String, Binding, Configuration) 方法

定义

将指定的绑定添加到集合。

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

参数

name
String

要添加的绑定的名称。

binding
Binding

一个表示要添加的绑定的 Binding 对象。

config
Configuration

此绑定的配置设置。

返回

Boolean

如果操作成功完成,则为 true;否则为 false

适用于