Class Translation<T0, T1, T2>
- Namespace
- Uncreated.Warfare.Translations
- Assembly
- Uncreated.Warfare.dll
public class Translation<T0, T1, T2> : Translation, IDisposable
Type Parameters
T0T1T2
- Inheritance
-
Translation<T0, T1, T2>
- Implements
- Inherited Members
- Extension Methods
Constructors
Translation(string, TranslationOptions, ArgumentFormat, ArgumentFormat, ArgumentFormat)
public Translation(string defaultValue, TranslationOptions options = TranslationOptions.None, ArgumentFormat arg0Fmt = default, ArgumentFormat arg1Fmt = default, ArgumentFormat arg2Fmt = default)
Parameters
defaultValuestringoptionsTranslationOptionsarg0FmtArgumentFormatarg1FmtArgumentFormatarg2FmtArgumentFormat
Properties
ArgumentCount
public override int ArgumentCount { get; }
Property Value
FormatArg0
public ArgumentFormat FormatArg0 { get; set; }
Property Value
FormatArg1
public ArgumentFormat FormatArg1 { get; set; }
Property Value
FormatArg2
public ArgumentFormat FormatArg2 { get; set; }
Property Value
Methods
GetArgumentFormat(int)
Returns the format of a given argument index.
public override ArgumentFormat GetArgumentFormat(int index)
Parameters
indexint
Returns
Translate(scoped in TranslationArguments, T0?, T1?, T2?)
public string Translate(scoped in TranslationArguments args, T0? arg0, T1? arg1, T2? arg2)
Parameters
argsTranslationArgumentsarg0T0arg1T1arg2T2
Returns
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
argumentsTranslationArgumentsformattingParametersobject[]
Returns
Remarks
formattingParameters have already been verified to be the correct type by this point.