Table of Contents

Class User

Namespace
C4.Net.Config
Assembly
C4.Net.Core.dll

Represents a configured workspace user and the role assigned to that user.

[DataContract]
public sealed class User : IEquatable<User>
Inheritance
User
Implements
Inherited Members

Properties

Role

Determines the permissions granted to the user.

[DataMember(Name = "role", EmitDefaultValue = true)]
public Role Role { get; }

Property Value

Role

Username

Identifies the user in Structurizr access control settings.

[DataMember(Name = "username", EmitDefaultValue = false)]
public string Username { get; }

Property Value

string

Methods

Equals(User)

Determines whether another user definition refers to the same username.

public bool Equals(User other)

Parameters

other User

The user to compare with this instance.

Returns

bool

true when both users have the same username; otherwise, false.

Equals(object)

Determines whether another object represents the same configured user.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with this instance.

Returns

bool

true when obj is a User with the same username; otherwise, false.

GetHashCode()

Computes a hash code based on the username.

public override int GetHashCode()

Returns

int

A hash code suitable for user set membership.