Class EnumParameterTemplate<TEnum>.EnumParameterValue
- Namespace
- Uncreated.Warfare.Quests.Parameters
- Assembly
- Uncreated.Warfare.dll
[JsonConverter(typeof(QuestParameterConverter))]
protected class EnumParameterTemplate<TEnum>.EnumParameterValue : QuestParameterValue<TEnum>, IFormattable, IEquatable<QuestParameterValue<TEnum>>, IEquatable<EnumParameterTemplate<TEnum>.EnumParameterValue>
- Inheritance
-
QuestParameterValue<TEnum>EnumParameterTemplate<TEnum>.EnumParameterValue
- Implements
-
IEquatable<QuestParameterValue<TEnum>>
- Inherited Members
- Extension Methods
Constructors
EnumParameterValue(EnumParameterTemplate<TEnum>)
public EnumParameterValue(EnumParameterTemplate<TEnum> template)
Parameters
templateEnumParameterTemplate<TEnum>
Methods
Equals(EnumParameterValue?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(EnumParameterTemplate<TEnum>.EnumParameterValue? other)
Parameters
otherEnumParameterTemplate<TEnum>.EnumParameterValueAn object to compare with this object.
Returns
Equals(QuestParameterValue<TEnum>?)
Indicates whether the current object is equal to another object of the same type.
public override bool Equals(QuestParameterValue<TEnum>? other)
Parameters
otherQuestParameterValue<TEnum>An object to compare with this object.
Returns
GetDisplayString(ITranslationValueFormatter)
Creates a string for use in translations.
public override object GetDisplayString(ITranslationValueFormatter formatter)
Parameters
formatterITranslationValueFormatter
Returns
GetSingleValue()
Get one value to use. Must either be a constant or selective.
public override TEnum GetSingleValue()
Returns
- TEnum
Exceptions
- InvalidOperationException
Inclusive selection is not supported when getting a single value.
IsMatch(TEnum)
Compare a value against the current value of this parameter. Best used with inclusive selection.
public override bool IsMatch(TEnum otherValue)
Parameters
otherValueTEnum
Returns
ToString()
Convert a parameter value back to a string.
public override string ToString()
Returns
TryParse(ReadOnlySpan<char>, out QuestParameterValue<TEnum>)
public static bool TryParse(ReadOnlySpan<char> str, out QuestParameterValue<TEnum> value)
Parameters
strReadOnlySpan<char>valueQuestParameterValue<TEnum>