23.159. Class Role

Namespace: ArmoniK.Core.Common.Injection.Options.Database
Assembly: ArmoniK.Core.Common.dll

Associate a Role to the permission it has

public record Role : IEquatable<Role>

23.159.1. Inheritance

objectRole

23.159.2. Implements

IEquatable<Role>

23.159.3. Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

23.159.4. Properties

23.159.4.1. Name

Role Name

public required string Name { get; init; }

23.159.4.1.1. Property Value

string

23.159.4.2. Permissions

Permissions associated to the Role

public required List<string> Permissions { get; init; }

23.159.4.2.1. Property Value

List<string>

23.159.5. Methods

23.159.5.1. Equals(Role?)

Indicates whether the current object is equal to another object of the same type.

public virtual bool Equals(Role? other)

23.159.5.1.1. Parameters

other Role?

An object to compare with this object.

23.159.5.1.2. Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

23.159.5.2. FromJson(string)

Build a Associate a Role to the permission it has from a JSON Represents text as a sequence of UTF-16 code units.

public static Role FromJson(string json)

23.159.5.2.1. Parameters

json string

JSON value

23.159.5.2.2. Returns

Role

built from the provided JSON

23.159.5.3. GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

23.159.5.3.1. Returns

int

A hash code for the current object.

23.159.5.4. ToJson()

Convert Associate a Role to the permission it has to JSON

public string ToJson()

23.159.5.4.1. Returns

string

representing the JSON object of this instance