Class ConstantValue<T>
public class ConstantValue<T> : ValueSource<T>
Type Parameters
T
- Inheritance
-
ValueSource<T>ConstantValue<T>
- Inherited Members
Constructors
ConstantValue()
public ConstantValue()
ConstantValue(T)
public ConstantValue(T value)
Parameters
value
T
ConstantValue(T, string)
public ConstantValue(T value, string text)
Parameters
value
Ttext
string
Properties
Value
public T Value { get; set; }
Property Value
- T
Methods
EvaluateAsync(ActivityContext, CancellationToken)
Evaluates the value.
public override Task<T> EvaluateAsync(ActivityContext context, CancellationToken cancellationToken = default)
Parameters
context
ActivityContextThe activity context.
cancellationToken
CancellationTokenA token that can request cancelling the evaluation.
Returns
- Task<T>
A task that represents the asynchronous operation. The value of its Result property contains the resulting value.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.