Skip to content

M_CodeJam_Mapping_MappingSchema_SetConvertExpression__2

andrewvk edited this page Jun 23, 2016 · 5 revisions

MappingSchema.SetConvertExpression(TFrom, TTo) Method (Expression(Func(TFrom, TTo)), Boolean)

Adds an expression that converts a value of type fromType to toType.

Namespace: CodeJam.Mapping
Assembly: CodeJam (in CodeJam.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

public void SetConvertExpression<TFrom, TTo>(
	Expression<Func<TFrom, TTo>> expr,
	bool addNullCheck = true
)

VB

Public Sub SetConvertExpression(Of TFrom, TTo) ( 
	expr As Expression(Of Func(Of TFrom, TTo)),
	Optional addNullCheck As Boolean = true
)

F#

member SetConvertExpression : 
        expr : Expression<Func<'TFrom, 'TTo>> * 
        ?addNullCheck : bool 
(* Defaults:
        let _addNullCheck = defaultArg addNullCheck true
*)
-> unit 

Parameters

 

expr
Type: System.Linq.Expressions.Expression(Func(TFrom, TTo))
Expression to set.
addNullCheck (Optional)
Type: System.Boolean
If true, adds an expression to check null value.

Type Parameters

 

TFrom
Type to convert from.
TTo
Type to convert to.

See Also

Reference

MappingSchema Class
SetConvertExpression Overload
CodeJam.Mapping Namespace

Clone this wiki locally