SecurityRoleAttribute Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor