Class RequiredPermissionsAttribute
Attribute to define the permissions of each command
Inherited Members
Namespace: DuetAPI.Utility
Assembly: DuetAPI.dll
Syntax
[AttributeUsage(AttributeTargets.Class)]
public sealed class RequiredPermissionsAttribute : Attribute
Constructors
RequiredPermissionsAttribute(SbcPermissions)
Constructor for this attribute type
Declaration
public RequiredPermissionsAttribute(SbcPermissions requiredPermissions)
Parameters
Type | Name | Description |
---|---|---|
SbcPermissions | requiredPermissions |
Methods
Check(SbcPermissions)
Check if the given permissions are sufficient
Declaration
public bool Check(SbcPermissions permissions)
Parameters
Type | Name | Description |
---|---|---|
SbcPermissions | permissions | Permissions to check |
Returns
Type | Description |
---|---|
bool | True if permission is granted |