Table of Contents

Class UserMailCategory

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

A kind of mail the product sends its users, which each user may turn off unless it is required.

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

Remarks

The key is stored on every choice a user makes and every mail queued, so it never changes once mail has been sent in it. The name and description are shown to users through the host's text catalogue: NameKey and DescriptionKey are what a translation is registered under, Name and Description the English used when there is none.

Properties

Description

One sentence on what the mail is about, in English.

public string Description { get; init; }

Property Value

string

DescriptionKey

The text key the description is translated under; userMail.category.{Key}.description unless set.

public string DescriptionKey { get; init; }

Property Value

string

Key

The stable key: lowercase letters, digits, dots, dashes and underscores, starting with a letter or digit.

public required string Key { get; init; }

Property Value

string

Name

The name shown to users, in English.

public required string Name { get; init; }

Property Value

string

NameKey

The text key the name is translated under; userMail.category.{Key}.name unless set.

public string NameKey { get; init; }

Property Value

string

OnByDefault

Whether a user who never chose receives it; ignored for a required category.

public bool OnByDefault { get; init; }

Property Value

bool

Required

Whether every user receives it whatever they chose, as account and security mail must be.

public bool Required { get; init; }

Property Value

bool

Methods

Receives(bool?)

Whether a user receives this category, given what they chose or null when they never chose.

public bool Receives(bool? choice)

Parameters

choice bool?

Returns

bool