Table of Contents

Class Translation<T0, T1>

Namespace
Uncreated.Warfare.Translations
Assembly
Uncreated.Warfare.dll
public class Translation<T0, T1> : Translation, IDisposable

Type Parameters

T0
T1
Inheritance
Translation<T0, T1>
Implements
Inherited Members
Extension Methods

Constructors

Translation(string, TranslationOptions, ArgumentFormat, ArgumentFormat)

public Translation(string defaultValue, TranslationOptions options = TranslationOptions.None, ArgumentFormat arg0Fmt = default, ArgumentFormat arg1Fmt = default)

Parameters

defaultValue string
options TranslationOptions
arg0Fmt ArgumentFormat
arg1Fmt ArgumentFormat

Properties

ArgumentCount

public override int ArgumentCount { get; }

Property Value

int

FormatArg0

public ArgumentFormat FormatArg0 { get; set; }

Property Value

ArgumentFormat

FormatArg1

public ArgumentFormat FormatArg1 { get; set; }

Property Value

ArgumentFormat

Methods

GetArgumentFormat(int)

Returns the format of a given argument index.

public override ArgumentFormat GetArgumentFormat(int index)

Parameters

index int

Returns

ArgumentFormat

Translate(scoped in TranslationArguments, T0?, T1?)

public string Translate(scoped in TranslationArguments args, T0? arg0, T1? arg1)

Parameters

args TranslationArguments
arg0 T0
arg1 T1

Returns

string

UnsafeTranslateIntl(in TranslationArguments, object?[])

Overridden in generic translation classes to cast the arguments without reflection.

protected override string UnsafeTranslateIntl(in TranslationArguments arguments, object?[] formattingParameters)

Parameters

arguments TranslationArguments
formattingParameters object[]

Returns

string

Remarks

formattingParameters have already been verified to be the correct type by this point.