Bagikan melalui


KeyContainerPermission Konstruktor

Definisi

Menginisialisasi instans baru kelas KeyContainerPermission.

Overload

KeyContainerPermission(KeyContainerPermissionFlags)

Menginisialisasi instans baru kelas KeyContainerPermission dengan akses yang ditentukan.

KeyContainerPermission(PermissionState)

Menginisialisasi instans baru kelas KeyContainerPermission dengan izin terbatas atau tidak dibatasi.

KeyContainerPermission(KeyContainerPermissionFlags, KeyContainerPermissionAccessEntry[])

Menginisialisasi instans baru kelas KeyContainerPermission dengan akses global yang ditentukan dan hak akses kontainer kunci tertentu.

KeyContainerPermission(KeyContainerPermissionFlags)

Sumber:
KeyContainerPermission.cs
Sumber:
KeyContainerPermission.cs
Sumber:
KeyContainerPermission.cs
Sumber:
KeyContainerPermission.cs

Menginisialisasi instans baru kelas KeyContainerPermission dengan akses yang ditentukan.

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)

Parameter

flags
KeyContainerPermissionFlags

Kombinasi bitwise dari nilai KeyContainerPermissionFlags.

Pengecualian

flags bukan kombinasi nilai KeyContainerPermissionFlags yang valid.

Contoh

Contoh kode berikut menunjukkan penggunaan konstruktor KeyContainerPermission.KeyContainerPermission(KeyContainerPermissionFlags).

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

Berlaku untuk

KeyContainerPermission(PermissionState)

Sumber:
KeyContainerPermission.cs
Sumber:
KeyContainerPermission.cs
Sumber:
KeyContainerPermission.cs
Sumber:
KeyContainerPermission.cs

Menginisialisasi instans baru kelas KeyContainerPermission dengan izin terbatas atau tidak dibatasi.

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)

Parameter

state
PermissionState

Salah satu nilai PermissionState.

Pengecualian

state bukan nilai PermissionState yang valid.

Keterangan

Membuat akses None (sepenuhnya dibatasi) atau Unrestricted ke kontainer utama.

Berlaku untuk

KeyContainerPermission(KeyContainerPermissionFlags, KeyContainerPermissionAccessEntry[])

Sumber:
KeyContainerPermission.cs
Sumber:
KeyContainerPermission.cs
Sumber:
KeyContainerPermission.cs
Sumber:
KeyContainerPermission.cs

Menginisialisasi instans baru kelas KeyContainerPermission dengan akses global yang ditentukan dan hak akses kontainer kunci tertentu.

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

Parameter

flags
KeyContainerPermissionFlags

Kombinasi bitwise dari nilai KeyContainerPermissionFlags.

accessList
KeyContainerPermissionAccessEntry[]

Array objek KeyContainerPermissionAccessEntry yang mengidentifikasi hak akses kontainer kunci tertentu.

Pengecualian

flags bukan kombinasi nilai KeyContainerPermissionFlags yang valid.

accessList null.

Contoh

Contoh kode berikut menunjukkan penggunaan konstruktor KeyContainerPermission.KeyContainerPermission(KeyContainerPermissionFlags, KeyContainerPermissionAccessEntry[]).

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

Berlaku untuk