DynamicMethodCompilerCreateSetHandlerTRootTarget, TRootValue Method (Type, PropertyInfo) |
Creates the set handler for the type and the property specified. It compiles an expression tree to create a dynamic setter. It's wise to cache the returning delegate.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses.Miscellaneous
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.7.0.0 (5.7.0)
Syntax public static Action<TRootTarget, TRootValue> CreateSetHandler<TRootTarget, TRootValue>(
Type targetType,
PropertyInfo propertyInfo
)
Public Shared Function CreateSetHandler(Of TRootTarget, TRootValue) (
targetType As Type,
propertyInfo As PropertyInfo
) As Action(Of TRootTarget, TRootValue)
Parameters
- targetType
- Type: SystemType
The type of the target object the value will be set on. - propertyInfo
- Type: System.ReflectionPropertyInfo
The property info of the property to set.
Type Parameters
- TRootTarget
- TRootValue
Return Value
Type:
ActionTRootTarget,
TRootValue
compiled delegate which is ready to use to set the property defined by propertyInfo on instances of the type specified
See Also