Class StringParameterTemplate.StringParameterValue
- Namespace
- Uncreated.Warfare.Quests.Parameters
- Assembly
- Uncreated.Warfare.dll
[JsonConverter(typeof(QuestParameterConverter))]
protected class StringParameterTemplate.StringParameterValue : QuestParameterValue<string>, IFormattable, IEquatable<QuestParameterValue<string>>, IEquatable<StringParameterTemplate.StringParameterValue>
- Inheritance
-
StringParameterTemplate.StringParameterValue
- Implements
- Inherited Members
- Extension Methods
Constructors
StringParameterValue(string?, string[]?, ParameterValueType)
public StringParameterValue(string? value, string[]? list, ParameterValueType valType)
Parameters
valuestringliststring[]valTypeParameterValueType
StringParameterValue(string?, ParameterValueType, string?)
public StringParameterValue(string? value, ParameterValueType valType, string? display)
Parameters
valuestringvalTypeParameterValueTypedisplaystring
StringParameterValue(string?, StringParameterTemplate, string?)
public StringParameterValue(string? value, StringParameterTemplate template, string? display)
Parameters
valuestringtemplateStringParameterTemplatedisplaystring
StringParameterValue(StringParameterTemplate)
public StringParameterValue(StringParameterTemplate template)
Parameters
templateStringParameterTemplate
Methods
Equals(QuestParameterValue<string>?)
Indicates whether the current object is equal to another object of the same type.
public override bool Equals(QuestParameterValue<string>? other)
Parameters
otherQuestParameterValue<string>An object to compare with this object.
Returns
Equals(StringParameterValue)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(StringParameterTemplate.StringParameterValue other)
Parameters
otherStringParameterTemplate.StringParameterValueAn 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 string GetSingleValue()
Returns
Exceptions
- InvalidOperationException
Inclusive selection is not supported when getting a single value.
IsMatch(string)
Compare a value against the current value of this parameter. Best used with inclusive selection.
public override bool IsMatch(string otherValue)
Parameters
otherValuestring
Returns
ToString()
Convert a parameter value back to a string.
public override string ToString()
Returns
TryParse(ReadOnlySpan<char>, out QuestParameterValue<string>)
public static bool TryParse(ReadOnlySpan<char> str, out QuestParameterValue<string> value)
Parameters
strReadOnlySpan<char>valueQuestParameterValue<string>