編輯

共用方式為


NamedPermissionSet Constructors

Definition

Initializes a new instance of the NamedPermissionSet class.

Overloads

NamedPermissionSet(NamedPermissionSet)

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

NamedPermissionSet(String)

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

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)

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

NamedPermissionSet(NamedPermissionSet)

Source:
NamedPermissionSet.cs
Source:
NamedPermissionSet.cs
Source:
NamedPermissionSet.cs
Source:
NamedPermissionSet.cs

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

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

Applies to

NamedPermissionSet(String)

Source:
NamedPermissionSet.cs
Source:
NamedPermissionSet.cs
Source:
NamedPermissionSet.cs
Source:
NamedPermissionSet.cs

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

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.

Applies to

NamedPermissionSet(String, PermissionState)

Source:
NamedPermissionSet.cs
Source:
NamedPermissionSet.cs
Source:
NamedPermissionSet.cs
Source:
NamedPermissionSet.cs

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

The name for the new named permission set.

state
PermissionState

One of the PermissionState values.

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 Unrestricted PermissionState. Permissions that do not implement IUnrestrictedPermission, such as identity permissions, will be empty instances.

Applies to

NamedPermissionSet(String, PermissionSet)

Source:
NamedPermissionSet.cs
Source:
NamedPermissionSet.cs
Source:
NamedPermissionSet.cs
Source:
NamedPermissionSet.cs

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

The name for the named permission set.

permSet
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 ("").

Applies to