ערוך

שתף באמצעות


KeyContainerPermission Constructors

Definition

Initializes a new instance of the KeyContainerPermission class.

Overloads

KeyContainerPermission(KeyContainerPermissionFlags)

Initializes a new instance of the KeyContainerPermission class with the specified access.

KeyContainerPermission(PermissionState)

Initializes a new instance of the KeyContainerPermission class with either restricted or unrestricted permission.

KeyContainerPermission(KeyContainerPermissionFlags, KeyContainerPermissionAccessEntry[])

Initializes a new instance of the KeyContainerPermission class with the specified global access and specific key container access rights.

KeyContainerPermission(KeyContainerPermissionFlags)

Source:
KeyContainerPermission.cs
Source:
KeyContainerPermission.cs
Source:
KeyContainerPermission.cs
Source:
KeyContainerPermission.cs

Initializes a new instance of the KeyContainerPermission class with the specified access.

public:
 KeyContainerPermission(System::Security::Permissions::KeyContainerPermissionFlags flags);
public KeyContainerPermission (System.Security.Permissions.KeyContainerPermissionFlags flags);
new System.Security.Permissions.KeyContainerPermission : System.Security.Permissions.KeyContainerPermissionFlags -> System.Security.Permissions.KeyContainerPermission
Public Sub New (flags As KeyContainerPermissionFlags)

Parameters

flags
KeyContainerPermissionFlags

A bitwise combination of the KeyContainerPermissionFlags values.

Exceptions

flags is not a valid combination of the KeyContainerPermissionFlags values.

Examples

The following code example shows the use of the KeyContainerPermission.KeyContainerPermission(KeyContainerPermissionFlags) constructor.

// Create a KeyContainerPermission with the right to open the key container.
KeyContainerPermission ^ keyContainerPerm = gcnew KeyContainerPermission( KeyContainerPermissionFlags::Open );
// Create a KeyContainerPermission with the right 
// to open the key container.
KeyContainerPermission keyContainerPerm = new
     KeyContainerPermission(KeyContainerPermissionFlags.Open);
' Create a KeyContainerPermission with the right to open the key container.
Dim keyContainerPerm As New KeyContainerPermission(KeyContainerPermissionFlags.Open)

Applies to

KeyContainerPermission(PermissionState)

Source:
KeyContainerPermission.cs
Source:
KeyContainerPermission.cs
Source:
KeyContainerPermission.cs
Source:
KeyContainerPermission.cs

Initializes a new instance of the KeyContainerPermission class with either restricted or unrestricted permission.

public:
 KeyContainerPermission(System::Security::Permissions::PermissionState state);
public KeyContainerPermission (System.Security.Permissions.PermissionState state);
new System.Security.Permissions.KeyContainerPermission : System.Security.Permissions.PermissionState -> System.Security.Permissions.KeyContainerPermission
Public Sub New (state As PermissionState)

Parameters

state
PermissionState

One of the PermissionState values.

Exceptions

state is not a valid PermissionState value.

Remarks

Creates either None (fully restricted) or Unrestricted access to key containers.

Applies to

KeyContainerPermission(KeyContainerPermissionFlags, KeyContainerPermissionAccessEntry[])

Source:
KeyContainerPermission.cs
Source:
KeyContainerPermission.cs
Source:
KeyContainerPermission.cs
Source:
KeyContainerPermission.cs

Initializes a new instance of the KeyContainerPermission class with the specified global access and specific key container access rights.

public:
 KeyContainerPermission(System::Security::Permissions::KeyContainerPermissionFlags flags, cli::array <System::Security::Permissions::KeyContainerPermissionAccessEntry ^> ^ accessList);
public KeyContainerPermission (System.Security.Permissions.KeyContainerPermissionFlags flags, System.Security.Permissions.KeyContainerPermissionAccessEntry[] accessList);
new System.Security.Permissions.KeyContainerPermission : System.Security.Permissions.KeyContainerPermissionFlags * System.Security.Permissions.KeyContainerPermissionAccessEntry[] -> System.Security.Permissions.KeyContainerPermission
Public Sub New (flags As KeyContainerPermissionFlags, accessList As KeyContainerPermissionAccessEntry())

Parameters

flags
KeyContainerPermissionFlags

A bitwise combination of the KeyContainerPermissionFlags values.

accessList
KeyContainerPermissionAccessEntry[]

An array of KeyContainerPermissionAccessEntry objects identifying specific key container access rights.

Exceptions

flags is not a valid combination of the KeyContainerPermissionFlags values.

accessList is null.

Examples

The following code example shows the use of the KeyContainerPermission.KeyContainerPermission(KeyContainerPermissionFlags, KeyContainerPermissionAccessEntry[]) constructor.

// Create an array of KeyContainerPermissionAccessEntry objects
array<KeyContainerPermissionAccessEntry^>^keyContainerPermAccEntryArray = {keyContainerPermAccEntry1,keyContainerPermAccEntry2};

// Create a new KeyContainerPermission using the array.
KeyContainerPermission ^ keyContainerPerm2 = gcnew KeyContainerPermission( KeyContainerPermissionFlags::AllFlags,keyContainerPermAccEntryArray );
// Create an array of KeyContainerPermissionAccessEntry objects
KeyContainerPermissionAccessEntry[] keyContainerPermAccEntryArray 
    = { keyContainerPermAccEntry1, keyContainerPermAccEntry2 };

// Create a new KeyContainerPermission using the array.
KeyContainerPermission keyContainerPerm2 = 
    new KeyContainerPermission(
    KeyContainerPermissionFlags.AllFlags,
    keyContainerPermAccEntryArray);
' Create an array of KeyContainerPermissionAccessEntry objects
Dim keyContainerPermAccEntryArray As KeyContainerPermissionAccessEntry() = _
    {keyContainerPermAccEntry1, keyContainerPermAccEntry2}

' Create a new KeyContainerPermission using the array.
Dim keyContainerPerm2 As _
    New KeyContainerPermission(KeyContainerPermissionFlags.AllFlags, keyContainerPermAccEntryArray)

Applies to