Table of Contents

Class UserNameChangeResult

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

Result of SetUserNameAsync(string, string, bool, CancellationToken). The local write has always completed when this is returned — a failure there throws instead.

public sealed record UserNameChangeResult : IEquatable<UserNameChangeResult>
Inheritance
UserNameChangeResult
Implements
Inherited Members

Remarks

DirectoryUpdated false with no DirectoryError is the ordinary case: the caller did not ask for the name to be written to the directory. That is not a failure and should not be reported as one. A write that was asked for and cannot be honoured is refused before the rename instead.

Constructors

UserNameChangeResult(bool, string)

Result of SetUserNameAsync(string, string, bool, CancellationToken). The local write has always completed when this is returned — a failure there throws instead.

public UserNameChangeResult(bool DirectoryUpdated = false, string DirectoryError = null)

Parameters

DirectoryUpdated bool

True when the name was also written to the external directory.

DirectoryError string

When a directory write was attempted and failed, the reason. The local write is not rolled back. The two succeed and fail independently, and coupling them would let a directory outage block renaming a user in this application.

Remarks

DirectoryUpdated false with no DirectoryError is the ordinary case: the caller did not ask for the name to be written to the directory. That is not a failure and should not be reported as one. A write that was asked for and cannot be honoured is refused before the rename instead.

Properties

DirectoryError

When a directory write was attempted and failed, the reason. The local write is not rolled back. The two succeed and fail independently, and coupling them would let a directory outage block renaming a user in this application.

public string DirectoryError { get; init; }

Property Value

string

DirectoryUpdated

True when the name was also written to the external directory.

public bool DirectoryUpdated { get; init; }

Property Value

bool