NamedPermissionSet NamedPermissionSet NamedPermissionSet NamedPermissionSet Constructors

Definition

Overloads

NamedPermissionSet(NamedPermissionSet) NamedPermissionSet(NamedPermissionSet) NamedPermissionSet(NamedPermissionSet) NamedPermissionSet(NamedPermissionSet)

Initializes a new instance of the NamedPermissionSet class from another named permission set.

NamedPermissionSet(String) NamedPermissionSet(String) NamedPermissionSet(String) NamedPermissionSet(String)

Initializes a new, empty instance of the NamedPermissionSet class with the specified name.

NamedPermissionSet(String, PermissionState) NamedPermissionSet(String, PermissionState) NamedPermissionSet(String, PermissionState) NamedPermissionSet(String, PermissionState)

Initializes a new instance of the NamedPermissionSet class with the specified name in either an unrestricted or a fully restricted state.

NamedPermissionSet(String, PermissionSet) NamedPermissionSet(String, PermissionSet) NamedPermissionSet(String, PermissionSet) NamedPermissionSet(String, PermissionSet)

Initializes a new instance of the NamedPermissionSet class with the specified name from a permission set.

NamedPermissionSet(NamedPermissionSet) NamedPermissionSet(NamedPermissionSet) NamedPermissionSet(NamedPermissionSet) NamedPermissionSet(NamedPermissionSet)

Initializes a new instance of the NamedPermissionSet class from another named permission set.

public:
 NamedPermissionSet(System::Security::NamedPermissionSet ^ permSet);
public NamedPermissionSet (System.Security.NamedPermissionSet permSet);
new System.Security.NamedPermissionSet : System.Security.NamedPermissionSet -> System.Security.NamedPermissionSet
Public Sub New (permSet As NamedPermissionSet)

Parameters

permSet
NamedPermissionSet NamedPermissionSet NamedPermissionSet NamedPermissionSet

The named permission set from which to create the new instance.

NamedPermissionSet(String) NamedPermissionSet(String) NamedPermissionSet(String) NamedPermissionSet(String)

Initializes a new, empty instance of the NamedPermissionSet class with the specified name.

public:
 NamedPermissionSet(System::String ^ name);
public NamedPermissionSet (string name);
new System.Security.NamedPermissionSet : string -> System.Security.NamedPermissionSet
Public Sub New (name As String)

Parameters

name
String String String String

The name for the new named permission set.

Exceptions

The name parameter is null or is an empty string ("").

Remarks

Using this constructor creates a named permission set with no permissions but with an Unrestricted permission state. A named permission set in an unrestricted state effectively contains all permissions that implement the IUnrestrictedPermission interface. The named permission set will contain all built-in permissions as well as all custom user-defined permissions that implement IUnrestrictedPermission. All permissions will have the equivalent of an Unrestricted permission state. Permissions that do not implement IUnrestrictedPermission will be empty instances.

NamedPermissionSet(String, PermissionState) NamedPermissionSet(String, PermissionState) NamedPermissionSet(String, PermissionState) NamedPermissionSet(String, PermissionState)

Initializes a new instance of the NamedPermissionSet class with the specified name in either an unrestricted or a fully restricted state.

public:
 NamedPermissionSet(System::String ^ name, System::Security::Permissions::PermissionState state);
public NamedPermissionSet (string name, System.Security.Permissions.PermissionState state);
new System.Security.NamedPermissionSet : string * System.Security.Permissions.PermissionState -> System.Security.NamedPermissionSet
Public Sub New (name As String, state As PermissionState)

Parameters

name
String String String String

The name for the new named permission set.

Exceptions

The name parameter is null or is an empty string ("").

Remarks

A named permission set in an unrestricted state effectively contains all permissions that implement the IUnrestrictedPermission interface. The named permission set will contain all built-in permissions as well as all custom permissions. All permissions will have an UnrestrictedPermissionState. Permissions that do not implement IUnrestrictedPermission, such as identity permissions, will be empty instances.

NamedPermissionSet(String, PermissionSet) NamedPermissionSet(String, PermissionSet) NamedPermissionSet(String, PermissionSet) NamedPermissionSet(String, PermissionSet)

Initializes a new instance of the NamedPermissionSet class with the specified name from a permission set.

public:
 NamedPermissionSet(System::String ^ name, System::Security::PermissionSet ^ permSet);
public NamedPermissionSet (string name, System.Security.PermissionSet permSet);
new System.Security.NamedPermissionSet : string * System.Security.PermissionSet -> System.Security.NamedPermissionSet
Public Sub New (name As String, permSet As PermissionSet)

Parameters

name
String String String String

The name for the named permission set.

permSet
PermissionSet PermissionSet PermissionSet PermissionSet

The permission set from which to take the value of the new named permission set.

Exceptions

The name parameter is null or is an empty string ("").

Examples

The following code example shows the use of the NamedPermissionSet constructor to create a new NamedPermissionSet object. This code example is part of a larger example provided for the NamedPermissionSet class.

Applies to