26.160. Class User
Namespace: ArmoniK.Core.Common.Injection.Options.Database
Assembly: ArmoniK.Core.Common.dll
Associate a User to its Roles
public record User : IEquatable<User>
26.160.1. Inheritance
26.160.2. Implements
26.160.3. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
26.160.4. Properties
26.160.4.1. Name
User Name
public required string Name { get; init; }
26.160.4.1.1. Property Value
26.160.4.2. Roles
Roles associated to the user
public required List<string> Roles { get; init; }
26.160.4.2.1. Property Value
26.160.5. Methods
26.160.5.1. Equals(User?)
Indicates whether the current object is equal to another object of the same type.
public virtual bool Equals(User? other)
26.160.5.1.1. Parameters
other User?
An object to compare with this object.
26.160.5.1.2. Returns
true if the current object is equal to the other parameter; otherwise, false.
26.160.5.2. FromJson(string)
Build a Associate a User to its Roles from a JSON Represents text as a sequence of UTF-16 code units.
public static User FromJson(string json)
26.160.5.2.1. Parameters
json string
JSON value
26.160.5.2.2. Returns
built from the provided JSON
26.160.5.3. GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
26.160.5.3.1. Returns
A hash code for the current object.
26.160.5.4. ToJson()
Convert Associate a User to its Roles to JSON
public string ToJson()
26.160.5.4.1. Returns
representing the JSON object of this instance