Table of Contents

Class Invitation

Namespace
Tharga.Team
Assembly
Tharga.Team.dll
public record Invitation : IEquatable<Invitation>
Inheritance
Invitation
Implements
Inherited Members

Properties

EMail

public required string EMail { get; init; }

Property Value

string

ExpiresAt

When this invitation stops being acceptable, or null to fall back to the configured Lifetime measured from InviteTime.

public DateTime? ExpiresAt { get; init; }

Property Value

DateTime?

Remarks

Deliberately not required, unlike the three above. Hosts construct an Invitation themselves — overriding member creation to generate the code and stamp the time is a supported thing to do — so a required member here would be a compile break for them rather than a new capability.

Why the expiry lives on the record rather than being derived. A lifetime alone answers "has this expired", but not "give this one another fortnight" — extending would mean rewriting InviteTime, which would falsify when the invitation was created. Holding the expiry separately is what lets an invitation be extended while InviteKey stays the same, so a link that has already been mailed keeps working.

Absent on invitations created before this existed, which is exactly the null case: they fall back to the configured lifetime, and where none is configured they never expire — the behaviour they had.

InviteKey

public required string InviteKey { get; init; }

Property Value

string

InviteTime

public required DateTime InviteTime { get; init; }

Property Value

DateTime