Table of Contents

Class QuestParameterTemplate<TValue>

Namespace
Uncreated.Warfare.Quests.Parameters
Assembly
Uncreated.Warfare.dll
public abstract class QuestParameterTemplate<TValue> : IFormattable, IEquatable<QuestParameterTemplate<TValue>>

Type Parameters

TValue
Inheritance
QuestParameterTemplate<TValue>
Implements
Derived
Inherited Members

Constructors

QuestParameterTemplate()

protected QuestParameterTemplate()

QuestParameterTemplate(ReadOnlySpan<char>)

protected QuestParameterTemplate(ReadOnlySpan<char> str)

Parameters

str ReadOnlySpan<char>

QuestParameterTemplate(IValueSet?, ParameterSelectionType)

protected QuestParameterTemplate(QuestParameterTemplate<TValue>.IValueSet? set, ParameterSelectionType selectionType)

Parameters

set QuestParameterTemplate<TValue>.IValueSet
selectionType ParameterSelectionType

Fields

Set

protected QuestParameterTemplate<TValue>.IValueSet? Set

Field Value

QuestParameterTemplate<TValue>.IValueSet

Properties

SelectionType

Selection style of the parameter. Inclusive allows any value in the set, where selective selects one value in the set.

public ParameterSelectionType SelectionType { get; protected set; }

Property Value

ParameterSelectionType

ValueType

Type of value set. Constant, list, wildcard, and sometimes range.

public ParameterValueType ValueType { get; protected set; }

Property Value

ParameterValueType

Methods

CreateValue(IServiceProvider)

Creates a random value from this selective set, or a set of values if this is an inclusive set.

public abstract UniTask<QuestParameterValue<TValue>> CreateValue(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider

Returns

UniTask<QuestParameterValue<TValue>>

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(QuestParameterTemplate<TValue>)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(QuestParameterTemplate<TValue> other)

Parameters

other QuestParameterTemplate<TValue>

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Convert a parameter template back to a string.

public override abstract string ToString()

Returns

string

TryParseFrom(ReadOnlySpan<char>)

Read a parameter template from a string.

public abstract bool TryParseFrom(ReadOnlySpan<char> str)

Parameters

str ReadOnlySpan<char>

Returns

bool

WriteJson(Utf8JsonWriter)

Write to a JSON writer.

public virtual void WriteJson(Utf8JsonWriter writer)

Parameters

writer Utf8JsonWriter