Table of Contents

Class SetOwnerResult

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

What a set-owner did: whether it changed anything, and which owners it displaced.

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

Remarks

Two fields rather than one, because an empty list means two different things. Repairing an ownerless team demotes nobody, and so does doing nothing at all. Returning only the list would make the audit decorator unable to tell a genuine repair from a sync pass that found the state already correct — and it would silently stop recording repairs, which are the entries most worth having.

Constructors

SetOwnerResult(bool, string[])

What a set-owner did: whether it changed anything, and which owners it displaced.

public SetOwnerResult(bool Changed, string[] DemotedOwnerKeys)

Parameters

Changed bool

False only when the requested owner was already the sole owner. Nothing was written and nothing was audited.

DemotedOwnerKeys string[]

User keys of the owners demoted to Administrator. Empty when the team had no owner to displace — which is a real change, not a no-op.

Remarks

Two fields rather than one, because an empty list means two different things. Repairing an ownerless team demotes nobody, and so does doing nothing at all. Returning only the list would make the audit decorator unable to tell a genuine repair from a sync pass that found the state already correct — and it would silently stop recording repairs, which are the entries most worth having.

Properties

Changed

False only when the requested owner was already the sole owner. Nothing was written and nothing was audited.

public bool Changed { get; init; }

Property Value

bool

DemotedOwnerKeys

User keys of the owners demoted to Administrator. Empty when the team had no owner to displace — which is a real change, not a no-op.

public string[] DemotedOwnerKeys { get; init; }

Property Value

string[]

NoChange

The requested owner already held the role alone.

public static SetOwnerResult NoChange { get; }

Property Value

SetOwnerResult