26.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>
26.159.1. Inheritance
26.159.2. Implements
26.159.3. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
26.159.4. Properties
26.159.4.1. Name
Role Name
public required string Name { get; init; }
26.159.4.1.1. Property Value
26.159.4.2. Permissions
Permissions associated to the Role
public required List<string> Permissions { get; init; }
26.159.4.2.1. Property Value
26.159.5. Methods
26.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)
26.159.5.1.1. Parameters
other Role?
An object to compare with this object.
26.159.5.1.2. Returns
true if the current object is equal to the other parameter; otherwise, false.
26.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)
26.159.5.2.1. Parameters
json string
JSON value
26.159.5.2.2. Returns
built from the provided JSON
26.159.5.3. GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
26.159.5.3.1. Returns
A hash code for the current object.
26.159.5.4. ToJson()
Convert Associate a Role to the permission it has to JSON
public string ToJson()
26.159.5.4.1. Returns
representing the JSON object of this instance