WSDualHttpBinding 构造函数
定义
初始化 WSDualHttpBinding 类的新实例。Initializes a new instance of the WSDualHttpBinding class.
重载
| WSDualHttpBinding() |
初始化 WSDualHttpBinding 类的新实例。Initializes a new instance of the WSDualHttpBinding class. |
| WSDualHttpBinding(WSDualHttpSecurityMode) |
通过绑定所使用的指定安全性类型初始化 WSDualHttpBinding 类的新实例。Initializes a new instance of the WSDualHttpBinding class with a specified type of security used by the binding. |
| WSDualHttpBinding(String) |
使用由配置名称指定的绑定初始化 WSDualHttpBinding 类的新实例。Initializes a new instance of the WSDualHttpBinding class with a binding specified by its configuration name. |
WSDualHttpBinding()
初始化 WSDualHttpBinding 类的新实例。Initializes a new instance of the WSDualHttpBinding class.
public:
WSDualHttpBinding();
public WSDualHttpBinding ();
Public Sub New ()
示例
下面的示例演示如何使用 wsDualHttpBinding 的无参数构造函数。The following example shows how to use the parameterless constructor for wsDualHttpBinding.
WSDualHttpBinding binding = new WSDualHttpBinding();
Dim binding As New WSDualHttpBinding()
适用于
WSDualHttpBinding(WSDualHttpSecurityMode)
通过绑定所使用的指定安全性类型初始化 WSDualHttpBinding 类的新实例。Initializes a new instance of the WSDualHttpBinding class with a specified type of security used by the binding.
public:
WSDualHttpBinding(System::ServiceModel::WSDualHttpSecurityMode securityMode);
public WSDualHttpBinding (System.ServiceModel.WSDualHttpSecurityMode securityMode);
new System.ServiceModel.WSDualHttpBinding : System.ServiceModel.WSDualHttpSecurityMode -> System.ServiceModel.WSDualHttpBinding
Public Sub New (securityMode As WSDualHttpSecurityMode)
参数
- securityMode
- WSDualHttpSecurityMode
WSDualHttpSecurityMode 的值,该值指定在 SOAP 消息和客户端中使用的安全类型。The value of WSDualHttpSecurityMode that specifies the type of security that is used with the SOAP message and for the client.
示例
下面的示例演示如何在安全模式下使用 wsDualHttpBinding 构造函数:The following example shows how to use the wsDualHttpBinding constructor with a security mode.
WSDualHttpBinding bindingSecurityMode =
new WSDualHttpBinding(WSDualHttpSecurityMode.Message);
Dim bindingSecurityMode As New WSDualHttpBinding(WSDualHttpSecurityMode.Message)
注解
WSDualHttpBinding 要求可靠的消息传递,所以没有可提供开关来将其关闭的构造函数,而只有 WSHttpBinding(SecurityMode) 的 WSHttpBinding 构造函数。Reliable messaging is required by the WSDualHttpBinding, so there is no constructor that provides a switch to turn it off as there is on the WSHttpBinding(SecurityMode) constructor for the WSHttpBinding.
适用于
WSDualHttpBinding(String)
使用由配置名称指定的绑定初始化 WSDualHttpBinding 类的新实例。Initializes a new instance of the WSDualHttpBinding class with a binding specified by its configuration name.
public:
WSDualHttpBinding(System::String ^ configName);
public WSDualHttpBinding (string configName);
new System.ServiceModel.WSDualHttpBinding : string -> System.ServiceModel.WSDualHttpBinding
Public Sub New (configName As String)
参数
- configName
- String
WSHttpBindingElement 的绑定配置名称。The binding configuration name for the WSHttpBindingElement.
例外
找不到名为 configurationName 的绑定元素。The binding element with the name configurationName was not found.