MexBindingBindingCollectionElement<TStandardBinding,TBindingConfiguration>.TryAdd(String, Binding, Configuration) 方法

定义

将指定的绑定添加到集合。Adds the specified binding to the collection.

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

参数

name
String

要添加的绑定的名称。The name of the binding to be added.

binding
Binding

一个表示要添加的绑定的 Binding 对象。A Binding object that represents the binding to be added.

config
Configuration

此绑定的配置设置。The configuration settings for this binding.

返回

Boolean

如果绑定可以添加到此集合,则为 true;否则为 falsetrue if the binding can be added to this collection; otherwise, false.

适用于