共用方式為


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);

適用於

另請參閱