23.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>

23.160.1. Inheritance

objectUser

23.160.2. Implements

IEquatable<User>

23.160.3. Inherited Members

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

23.160.4. Properties

23.160.4.1. Name

User Name

public required string Name { get; init; }

23.160.4.1.1. Property Value

string

23.160.4.2. Roles

Roles associated to the user

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

23.160.4.2.1. Property Value

List<string>

23.160.5. Methods

23.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)

23.160.5.1.1. Parameters

other User?

An object to compare with this object.

23.160.5.1.2. Returns

bool

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

23.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)

23.160.5.2.1. Parameters

json string

JSON value

23.160.5.2.2. Returns

User

built from the provided JSON

23.160.5.3. GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

23.160.5.3.1. Returns

int

A hash code for the current object.

23.160.5.4. ToJson()

Convert Associate a User to its Roles to JSON

public string ToJson()

23.160.5.4.1. Returns

string

representing the JSON object of this instance