MessageQueuePermissionAttribute(SecurityAction) 构造函数

定义

初始化 MessageQueuePermissionAttribute 类的新实例。

public:
 MessageQueuePermissionAttribute(System::Security::Permissions::SecurityAction action);
public MessageQueuePermissionAttribute (System.Security.Permissions.SecurityAction action);
new System.Messaging.MessageQueuePermissionAttribute : System.Security.Permissions.SecurityAction -> System.Messaging.MessageQueuePermissionAttribute
Public Sub New (action As SecurityAction)

参数

action
SecurityAction

SecurityAction 值之一。

示例

下面的代码示例创建 的新 MessageQueuePermissionAttribute实例。


// Create a new instance of MessageQueuePermissionAttribute.
MessageQueuePermissionAttribute^ attribute =
    gcnew MessageQueuePermissionAttribute(
    System::Security::Permissions::SecurityAction::Assert);

// Create a new instance of MessageQueuePermissionAttribute.
MessageQueuePermissionAttribute attribute =
    new MessageQueuePermissionAttribute(
    System.Security.Permissions.SecurityAction.Assert);

适用于

另请参阅