Class ValueSourceValueSource<T, TSource>
public class ValueSourceValueSource<T, TSource> : ValueSource<T> where TSource : T
Type Parameters
TTSource
- Inheritance
-
ValueSource<T>ValueSourceValueSource<T, TSource>
- Inherited Members
Constructors
ValueSourceValueSource()
public ValueSourceValueSource()
ValueSourceValueSource(ValueSource<TSource>)
public ValueSourceValueSource(ValueSource<TSource> source)
Parameters
sourceValueSource<TSource>
Properties
Source
public ValueSource<TSource>? Source { get; set; }
Property Value
- ValueSource<TSource>
Methods
EvaluateAsync(ActivityContext, CancellationToken)
Evaluates the value.
public override Task<T> EvaluateAsync(ActivityContext context, CancellationToken cancellationToken = default)
Parameters
contextActivityContextThe activity context.
cancellationTokenCancellationTokenA 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.
Exceptions
- ArgumentNullException
contextis null.- Exception
The value could not be evaluated. Possible exceptions depend on the implementation.
ToString()
public override string ToString()