|
ValueExpressionParserTUpdateExpressionsTExpressionScope(IEnumerablePropertyInfo, TypeRegistry) Method
|
Generates a delegate that will execute expression assignments on an instance of type
T
accepting a contextual
IValueExpressionScopeT object parameter where expressions
are
TypeConvertedValueExpressionAttribute instances that are declared on the type
T properties. Target
T instance needs to be
assigned to the
Instance property prior to call.
Namespace: GSF.ComponentModelAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax Remarks
This function is useful for generating a delegate to a compiled function that will execute expression
assignments on objects of type
T where properties of the type of have been decorated
with
TypeConvertedValueExpressionAttribute attributes. The generated delegate takes a parameter
to a contextual object useful for providing extra runtime data to the expressions defined in attributes
of type
TypeConvertedValueExpressionAttribute; the contextual parameter must be derived
from
IValueExpressionScopeT. Any public fields, methods or properties defined in the
derived class will be automatically accessible from the expressions declared in the
TypeConvertedValueExpressionAttribute attributes. By default, the expressions will have
access to the current
T instance by referencing the
this keyword,
which is an alias to
Instance. Note that the expression in
the
TypeConvertedValueExpressionAttribute attribute is expected to evaluate to a property
such that it can be assigned the target type
T property value.
Note |
---|
This function will assign current modeled property values back to expressions, this is often useful
when a model is being synchronized to an external source, e.g., user interface elements.
|
See Also