|
ValueExpressionParserTUpdateExpressions(IEnumerablePropertyInfo, TypeRegistry) Method
|
Generates a delegate that will execute expression assignments on an instance of type
T
where expressions are
TypeConvertedValueExpressionAttribute instances that are declared
on the type
T properties. Target
T instance is accepted
as the parameter to the returned delegate
ActionT.
Namespace: GSF.ComponentModelAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax Public Shared Function UpdateExpressions (
Optional properties As IEnumerable(Of PropertyInfo) = Nothing,
Optional typeRegistry As TypeRegistry = Nothing
) As Action(Of T)
static member UpdateExpressions :
?properties : IEnumerable<PropertyInfo> *
?typeRegistry : TypeRegistry
(* Defaults:
let _properties = defaultArg properties null
let _typeRegistry = defaultArg typeRegistry null
*)
-> Action<'T>
GSF.ComponentModel.ValueExpressionParser.UpdateExpressions = function(properties, typeRegistry);
View SourceParameters
- properties IEnumerablePropertyInfo (Optional)
- Specific properties to target, or null to target all properties.
- typeRegistry TypeRegistry (Optional)
-
Type registry to use when parsing TypeConvertedValueExpressionAttribute instances,
or null to use DefaultTypeRegistry.
Return Value
ActionT
Generated delegate that will execute expression assignments on
T instances.
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. 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.
|
This method is the inverse call for UpdateProperties(IEnumerablePropertyInfo, TypeRegistry).
See Also