Skip to content

MockLocale

ClassMockMagiccom.wetzold.mock-magic
public sealed class MockLocale

Immutable locale identity with lazily initialized, attributed generation data.

public MockLocaleCoverage GetCoverage(SimpleDataType type)

Reports generator support and whether its data or presentation uses a fallback for this profile.

Parameters

NameTypeDescription
typeMockMagic.SimpleDataTypeThe generator whose locale coverage to inspect.

Returns

MockMagic.MockLocaleCoverage: Support and fallback flags with a description of the selected data or regional convention.

public override string ToString()

Returns

System.String

public IReadOnlyList<string> GetLabels(LabelPreset preset)

Returns the preset’s read-only label choices, using Default choices when this profile has none.

Parameters

NameTypeDescription
presetMockMagic.LabelPresetThe finite label preset to retrieve.

Returns

System.Collections.Generic.IReadOnlyList{System.String}: Cached label choices, or an empty list when the preset has no stored choices, such as generated or custom labels.

public MockLocaleCoverage GetLabelCoverage(LabelPreset preset)

Describes a label preset’s locale support and any English fallback used by its labels or generated prefixes.

Parameters

NameTypeDescription
presetMockMagic.LabelPresetThe label preset whose locale coverage to inspect.

Returns

MockMagic.MockLocaleCoverage: Support and fallback flags with a description of the label source; custom labels remain verbatim.

public string GetLabelPrefix(LabelPreset preset)

Returns the English prefix used to generate labels for a preset.

Parameters

NameTypeDescription
presetMockMagic.LabelPresetThe preset that selects the prefix.

Returns

System.String: Product, Category, or Team for those presets; otherwise Item.

public string GetQuarterLabel(int quarter, int year)

Formats a one-based quarter and year using this profile’s quarter names.

Parameters

NameTypeDescription
quarterSystem.Int32The quarter number, from 1 through 4.
yearSystem.Int32The year to append using invariant numeric formatting.

Returns

System.String: The quarter name followed by the year, using Q1 through Q4 if four localized names are unavailable.

public string GetCycleSuffix(int cycle, bool week = false)

Formats an English week or set suffix for a repeated label cycle.

Parameters

NameTypeDescription
cycleSystem.Int32The cycle number to append using invariant numeric formatting.
weekSystem.BooleanWhether to use Week instead of the default Set prefix.

Returns

System.String: Week or Set followed by the supplied cycle number.

public string Id { get; }

Returns

System.String

public string DisplayName { get; }

Returns

System.String

public string NativeName { get; }

Returns

System.String

public string CountryCode { get; }

Returns

System.String

public string DataRevision { get; }

Returns

System.String

public bool IsDefault { get; }

Returns

System.Boolean

public bool IsRightToLeft { get; }

Returns

System.Boolean

public IReadOnlyList<string> Aliases { get; }

Returns

System.Collections.Generic.IReadOnlyList{System.String}