Class NamedTalesValueForExpressionContextAdapter
A wrapper/adapter for an instance of ExpressionContext which allows it to be used as an instance of IGetsNamedTalesValue.
Inheritance
Implements
Inherited Members
Namespace: ZptSharp.Expressions
Assembly: ZptSharp.dll
Syntax
public class NamedTalesValueForExpressionContextAdapter : IGetsNamedTalesValue
Constructors
| Improve this Doc View SourceNamedTalesValueForExpressionContextAdapter(ExpressionContext, RenderingConfig, IGetsBuiltinContextsProvider)
Initializes a new instance of the NamedTalesValueForExpressionContextAdapter class.
Declaration
public NamedTalesValueForExpressionContextAdapter(ExpressionContext context, RenderingConfig config, IGetsBuiltinContextsProvider builtinContextsProviderFactory)
Parameters
Type | Name | Description |
---|---|---|
ExpressionContext | context | The expression context for which this provider will operate. |
RenderingConfig | config | Rendering configuration. |
IGetsBuiltinContextsProvider | builtinContextsProviderFactory | Builtin contexts provider factory. |
Fields
| Improve this Doc View SourceContextsName
A reserved identifier/alias which indicates that the built-in contexts should be returned.
Declaration
public static readonly string ContextsName
Field Value
Type | Description |
---|---|
System.String |
Properties
| Improve this Doc View SourceContext
Gets the expression context wrapped by the current instance.
Declaration
public ExpressionContext Context { get; }
Property Value
Type | Description |
---|---|
ExpressionContext | The expression context. |
Methods
| Improve this Doc View SourceTryGetValueAsync(String, CancellationToken)
Attempts to get a value for a named reference, relative to the current instance.
Declaration
public Task<GetValueResult> TryGetValueAsync(string name, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the value to retrieve. |
System.Threading.CancellationToken | cancellationToken | An optional cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<GetValueResult> | An object indicating whether a value was successfully retrieved or not, along with the retrieved value (if applicable). |