Class DecoratorBasedObjectValueProvider
An implementation of IGetsValueFromObject which builds and delegates to a service using a combination of the decorator & chain of responsibility patterns.
That service ultimately implements the same interface as this class but provides logic declared in many other classes.
Inheritance
Implements
Inherited Members
Namespace: ZptSharp.Expressions.PathExpressions
Assembly: ZptSharp.dll
Syntax
public class DecoratorBasedObjectValueProvider : IGetsValueFromObject
Constructors
| Improve this Doc View SourceDecoratorBasedObjectValueProvider(RenderingConfig, IGetsBuiltinContextsProvider, IReadsAndWritesDocument, IGetsMetalDocumentAdapter, RootScopeLimitation, IGetsValueFromReflection)
Initializes a new instance of the DecoratorBasedObjectValueProvider class.
Declaration
public DecoratorBasedObjectValueProvider(RenderingConfig config, IGetsBuiltinContextsProvider builtinContextsProviderFactory, IReadsAndWritesDocument readerWriter, IGetsMetalDocumentAdapter adapterFactory, RootScopeLimitation scopeLimitation, IGetsValueFromReflection reflectionValueProvider)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingConfig | config | Config. |
| IGetsBuiltinContextsProvider | builtinContextsProviderFactory | Builtin contexts provider factory. |
| IReadsAndWritesDocument | readerWriter | A document reader/writer. |
| IGetsMetalDocumentAdapter | adapterFactory | A METAL document adapter factory. |
| RootScopeLimitation | scopeLimitation | The manner in which the root scope is limited |
| IGetsValueFromReflection | reflectionValueProvider | The reflection value provider. |
Methods
| Improve this Doc View SourceTryGetValueAsync(String, Object, CancellationToken)
Attempts to get a value for a named reference, from the specified object.
Declaration
public Task<GetValueResult> TryGetValueAsync(string name, object object, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The value name. |
| System.Object | object | The object from which to retrieve the value. |
| 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). |