Bagikan melalui


KeyContainerPermission Konstruktor

Definisi

Menginisialisasi instans baru kelas KeyContainerPermission.

Overload

KeyContainerPermission(KeyContainerPermissionFlags)

Menginisialisasi instans KeyContainerPermission baru kelas dengan akses yang ditentukan.

KeyContainerPermission(PermissionState)

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

KeyContainerPermission(KeyContainerPermissionFlags, KeyContainerPermissionAccessEntry[])

Menginisialisasi instans KeyContainerPermission baru kelas 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 KeyContainerPermission baru kelas 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 KeyContainerPermissionFlags nilai.

Pengecualian

flags bukan kombinasi nilai yang KeyContainerPermissionFlags valid.

Contoh

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

// 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 KeyContainerPermission baru kelas dengan izin terbatas atau tidak terbatas.

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 PermissionState satu nilai.

Pengecualian

state bukan nilai yang valid PermissionState .

Keterangan

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

Berlaku untuk

KeyContainerPermission(KeyContainerPermissionFlags, KeyContainerPermissionAccessEntry[])

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

Menginisialisasi instans KeyContainerPermission baru kelas 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 KeyContainerPermissionFlags nilai.

accessList
KeyContainerPermissionAccessEntry[]

Array KeyContainerPermissionAccessEntry objek yang mengidentifikasi hak akses kontainer kunci tertentu.

Pengecualian

flags bukan kombinasi nilai yang KeyContainerPermissionFlags valid.

accessListadalah null.

Contoh

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

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