MessageContractAttribute.ProtectionLevel 属性

定义

获取或设置一个值,该值指定是否对消息进行加密、签名或同时执行这两种操作。Gets or sets a value that specified whether the message must be encrypted, signed, or both.

public:
 property System::Net::Security::ProtectionLevel ProtectionLevel { System::Net::Security::ProtectionLevel get(); void set(System::Net::Security::ProtectionLevel value); };
public System.Net.Security.ProtectionLevel ProtectionLevel { get; set; }
member this.ProtectionLevel : System.Net.Security.ProtectionLevel with get, set
Public Property ProtectionLevel As ProtectionLevel

属性值

ProtectionLevel

ProtectionLevel 值之一。One of the ProtectionLevel values. 默认值为 NoneThe default is None.

例外

设置不是 ProtectionLevel 值之一时传递给属性的值。The value passed to the property when the setting is not one of the ProtectionLevel values.

注解

有关保护级别及其假设和范围的详细信息,请参阅 了解保护级别For details about protection levels and their assumptions and scopes, see Understanding Protection Level.

适用于