Rediger

Del via


SecurityRoleAttribute Constructors

Definition

Initializes a new instance of the SecurityRoleAttribute class and sets the Role property.

Overloads

SecurityRoleAttribute(String)

Initializes a new instance of the SecurityRoleAttribute class and sets the Role property.

SecurityRoleAttribute(String, Boolean)

Initializes a new instance of the SecurityRoleAttribute class and sets the Role and SetEveryoneAccess properties.

SecurityRoleAttribute(String)

Initializes a new instance of the SecurityRoleAttribute class and sets the Role property.

public:
 SecurityRoleAttribute(System::String ^ role);
public SecurityRoleAttribute (string role);
new System.EnterpriseServices.SecurityRoleAttribute : string -> System.EnterpriseServices.SecurityRoleAttribute
Public Sub New (role As String)

Parameters

role
String

A security role for the application, component, interface, or method.

Examples

The following code example demonstrates the use of this attribute to associate a role with an assembly that contains ServicedComponent classes.

// Create a security role for the component.
[assembly:SecurityRole("Manager")];
// Create a security role for the component.
[assembly: SecurityRole("Manager")]
' Create a security role for the component.
<Assembly: SecurityRole("Manager")>

Applies to

SecurityRoleAttribute(String, Boolean)

Initializes a new instance of the SecurityRoleAttribute class and sets the Role and SetEveryoneAccess properties.

public:
 SecurityRoleAttribute(System::String ^ role, bool everyone);
public SecurityRoleAttribute (string role, bool everyone);
new System.EnterpriseServices.SecurityRoleAttribute : string * bool -> System.EnterpriseServices.SecurityRoleAttribute
Public Sub New (role As String, everyone As Boolean)

Parameters

role
String

A security role for the application, component, interface, or method.

everyone
Boolean

true to require that the newly created role have the Everyone user group added as a user; otherwise, false.

Applies to