Skip to content

M_CodeJam_Mapping_MappingSchema_GetConvertExpression

Andrew Koryavchenko edited this page Jun 17, 2018 · 5 revisions

MappingSchema.GetConvertExpression Method (Type, Type, Boolean, Boolean)

Returns an expression that converts a value of type from to to.

Namespace: CodeJam.Mapping
Assembly: CodeJam.Blocks (in CodeJam.Blocks.dll) Version: 2.0.0.0

Syntax

C#

public LambdaExpression GetConvertExpression(
	Type from,
	Type to,
	bool checkNull = true,
	bool createDefault = true
)

VB

Public Function GetConvertExpression ( 
	from As Type,
	to As Type,
	Optional checkNull As Boolean = true,
	Optional createDefault As Boolean = true
) As LambdaExpression

F#

member GetConvertExpression : 
        from : Type * 
        to : Type * 
        ?checkNull : bool * 
        ?createDefault : bool 
(* Defaults:
        let _checkNull = defaultArg checkNull true
        let _createDefault = defaultArg createDefault true
*)
-> LambdaExpression 

Parameters

 

from
Type: System.Type
Type to convert from.
to
Type: System.Type
Type to convert to.
checkNull (Optional)
Type: System.Boolean
If true, created expression checks input value for null.
createDefault (Optional)
Type: System.Boolean
If true, new expression is created.

Return Value

Type: LambdaExpression
Convert expression.

See Also

Reference

MappingSchema Class
GetConvertExpression Overload
CodeJam.Mapping Namespace

Clone this wiki locally