Table of Contents

Class UserMailFrequencyPhrase

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

The words for how often a category is sent: which text, by its key and English default, and the number it holds.

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

Remarks

The one place the rounding is decided. None sent reads as none in the past year, or none recently when the period counted is shorter; under one a year as fewer than one a year; under about twelve a year as about N a year; under four and a half a month as about N a month; anything more as about N a week. N is rounded to the nearest whole number and is never below one.

Constructors

UserMailFrequencyPhrase(string, string, int)

The words for how often a category is sent: which text, by its key and English default, and the number it holds.

public UserMailFrequencyPhrase(string Key, string English, int Count)

Parameters

Key string

The text key, one of the UserMailTexts.Frequency…Key constants.

English string

The English default, holding {0} where the number goes when it has one.

Count int

The number, or zero for a phrase without one.

Remarks

The one place the rounding is decided. None sent reads as none in the past year, or none recently when the period counted is shorter; under one a year as fewer than one a year; under about twelve a year as about N a year; under four and a half a month as about N a month; anything more as about N a week. N is rounded to the nearest whole number and is never below one.

Properties

Count

The number, or zero for a phrase without one.

public int Count { get; init; }

Property Value

int

English

The English default, holding {0} where the number goes when it has one.

public string English { get; init; }

Property Value

string

Key

The text key, one of the UserMailTexts.Frequency…Key constants.

public string Key { get; init; }

Property Value

string

Methods

Format(string)

The phrase in template, its translation, with the number in place; the English when the translation does not format.

public string Format(string template)

Parameters

template string

Returns

string

None(bool)

The words for none sent: in the past year when a whole year was counted, recently otherwise.

public static UserMailFrequencyPhrase None(bool coversAYear)

Parameters

coversAYear bool

Returns

UserMailFrequencyPhrase

Of(double)

The words for mail received on average perMonth times a month.

public static UserMailFrequencyPhrase Of(double perMonth)

Parameters

perMonth double

Returns

UserMailFrequencyPhrase

Of(UserMailCategoryFrequency)

The words for a category's frequency.

public static UserMailFrequencyPhrase Of(UserMailCategoryFrequency frequency)

Parameters

frequency UserMailCategoryFrequency

Returns

UserMailFrequencyPhrase