NetMsmqSecurity.Mode 属性

定义

获取或设置与 NetMsmqSecurityMode 绑定关联的 NetMsmqBindingGets or sets the NetMsmqSecurityMode that is associated with the NetMsmqBinding binding.

public:
 property System::ServiceModel::NetMsmqSecurityMode Mode { System::ServiceModel::NetMsmqSecurityMode get(); void set(System::ServiceModel::NetMsmqSecurityMode value); };
public System.ServiceModel.NetMsmqSecurityMode Mode { get; set; }
member this.Mode : System.ServiceModel.NetMsmqSecurityMode with get, set
Public Property Mode As NetMsmqSecurityMode

属性值

NetMsmqSecurityMode

NetMsmqSecurityMode 绑定关联的 NetMsmqBindingThe NetMsmqSecurityMode that is associated with the NetMsmqBinding binding.

例外

值不是 NetMsmqSecurityMode 值之一。Value is not one of NetMsmqSecurityMode values.

示例

NetMsmqSecurityMode secMode = security.Mode;
Dim secMode = security.Mode

注解

此属性确定由关联的 NetMsmqBinding 使用的安全类型。This property determines the type of security used by the associated NetMsmqBinding. 下面的列表描述了可接受的值:The following list describes the acceptable values:

  • -不使用安全性。None - no security is used.

  • 使用 传输-传输安全。Transport - transport security is used.

  • 消息 -使用基于消息的安全性。Message - message-based security is used.

  • Both -同时使用基于消息的安全和传输安全。Both - both message-based security and transport security is used.

适用于