Show / Hide Table of Contents

Class PermissionEntity

Encapsulates functionality to associate a principal and a permissions set.

Inheritance
System.Object
PermissionEntity
Implements
IPermissionEntity
Namespace: Microsoft.GNS.Roster.Internal
Assembly: Microsoft.GNS.Roster.Internal.dll
Syntax
public sealed class PermissionEntity : object, IPermissionEntity

Constructors

View Source

PermissionEntity()

Initializes a new instance of the PermissionEntity class.

Declaration
public PermissionEntity()
View Source

PermissionEntity(IRosterPrincipal, PermissionFlags)

Initializes a new instance of the PermissionEntity class.

Declaration
public PermissionEntity(IRosterPrincipal principal, PermissionFlags permissions)
Parameters
Type Name Description
IRosterPrincipal principal

The principal to permission.

PermissionFlags permissions

The permissions.

Fields

View Source

Empty

Represents an empty or unset version of this object.

Declaration
public static readonly PermissionEntity Empty
Field Value
Type Description
PermissionEntity

Properties

View Source

Permissions

Gets or sets the permissions flags.

Declaration
public PermissionFlags Permissions { get; set; }
Property Value
Type Description
PermissionFlags
View Source

Principal

Gets the principal in which to set permissions.

Declaration
public IRosterPrincipal Principal { get; }
Property Value
Type Description
IRosterPrincipal

Methods

View Source

Equals(Nullable<Object>)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
System.Nullable<System.Object> obj
Returns
Type Description
System.Boolean
View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
View Source

HasPermission(PermissionFlags)

Checks for a specific permission by integer value.

Declaration
public bool HasPermission(PermissionFlags value)
Parameters
Type Name Description
PermissionFlags value

The permission value to check.

Returns
Type Description
System.Boolean

True if the principal has the permission. Otherwise false.

View Source

PossiblePermissions()

Gets a list of possible permissions.

Declaration
public static IEnumerable<PermissionFlags> PossiblePermissions()
Returns
Type Description
IEnumerable<PermissionFlags>

A list of possible permissions.

Implements

IPermissionEntity
  • View Source
In This Article
Back to top Generated by DocFX