Class TypeMapper
- Namespace
- LinqToDB.Expressions
- Assembly
- linq2db.dll
Implements typed mappings support for dynamically loaded types.
public sealed class TypeMapper
- Inheritance
-
TypeMapper
- Extension Methods
Methods
BuildAction(LambdaExpression)
public Action BuildAction(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
BuildAction<T>(LambdaExpression)
public Action<T> BuildAction<T>(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
- Action<T>
Type Parameters
T
BuildAction<T1, T2>(LambdaExpression)
public Action<T1, T2> BuildAction<T1, T2>(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
- Action<T1, T2>
Type Parameters
T1
T2
BuildAction<T1, T2, T3>(LambdaExpression)
public Action<T1, T2, T3> BuildAction<T1, T2, T3>(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
- Action<T1, T2, T3>
Type Parameters
T1
T2
T3
BuildAction<T1, T2, T3, T4>(LambdaExpression)
public Action<T1, T2, T3, T4> BuildAction<T1, T2, T3, T4>(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
- Action<T1, T2, T3, T4>
Type Parameters
T1
T2
T3
T4
BuildAction<T1, T2, T3, T4, T5>(LambdaExpression)
public Action<T1, T2, T3, T4, T5> BuildAction<T1, T2, T3, T4, T5>(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
- Action<T1, T2, T3, T4, T5>
Type Parameters
T1
T2
T3
T4
T5
BuildFactory<TR>(Expression<Func<TR>>)
public Func<object> BuildFactory<TR>(Expression<Func<TR>> newFunc) where TR : TypeWrapper
Parameters
newFunc
Expression<Func<TR>>
Returns
Type Parameters
TR
BuildFactory<T, TR>(Expression<Func<T, TR>>)
public Func<T, object> BuildFactory<T, TR>(Expression<Func<T, TR>> newFunc) where TR : TypeWrapper
Parameters
newFunc
Expression<Func<T, TR>>
Returns
Type Parameters
T
TR
BuildFactory<T1, T2, TR>(Expression<Func<T1, T2, TR>>)
public Func<T1, T2, object> BuildFactory<T1, T2, TR>(Expression<Func<T1, T2, TR>> newFunc) where TR : TypeWrapper
Parameters
newFunc
Expression<Func<T1, T2, TR>>
Returns
Type Parameters
T1
T2
TR
BuildFactory<T1, T2, T3, TR>(Expression<Func<T1, T2, T3, TR>>)
public Func<T1, T2, T3, object> BuildFactory<T1, T2, T3, TR>(Expression<Func<T1, T2, T3, TR>> newFunc) where TR : TypeWrapper
Parameters
newFunc
Expression<Func<T1, T2, T3, TR>>
Returns
Type Parameters
T1
T2
T3
TR
BuildFunc<TR>(LambdaExpression)
public Func<TR> BuildFunc<TR>(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
- Func<TR>
Type Parameters
TR
BuildFunc<T, TR>(LambdaExpression)
public Func<T, TR> BuildFunc<T, TR>(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
- Func<T, TR>
Type Parameters
T
TR
BuildFunc<T1, T2, TR>(LambdaExpression)
public Func<T1, T2, TR> BuildFunc<T1, T2, TR>(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
- Func<T1, T2, TR>
Type Parameters
T1
T2
TR
BuildFunc<T1, T2, T3, TR>(LambdaExpression)
public Func<T1, T2, T3, TR> BuildFunc<T1, T2, T3, TR>(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
- Func<T1, T2, T3, TR>
Type Parameters
T1
T2
T3
TR
BuildFunc<T1, T2, T3, T4, TR>(LambdaExpression)
public Func<T1, T2, T3, T4, TR> BuildFunc<T1, T2, T3, T4, TR>(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
- Func<T1, T2, T3, T4, TR>
Type Parameters
T1
T2
T3
T4
TR
BuildFunc<T1, T2, T3, T4, T5, TR>(LambdaExpression)
public Func<T1, T2, T3, T4, T5, TR> BuildFunc<T1, T2, T3, T4, T5, TR>(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
- Func<T1, T2, T3, T4, T5, TR>
Type Parameters
T1
T2
T3
T4
T5
TR
BuildFunc<T1, T2, T3, T4, T5, T6, TR>(LambdaExpression)
public Func<T1, T2, T3, T4, T5, T6, TR> BuildFunc<T1, T2, T3, T4, T5, T6, TR>(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
- Func<T1, T2, T3, T4, T5, T6, TR>
Type Parameters
T1
T2
T3
T4
T5
T6
TR
BuildFunc<T1, T2, T3, T4, T5, T6, T7, TR>(LambdaExpression)
public Func<T1, T2, T3, T4, T5, T6, T7, TR> BuildFunc<T1, T2, T3, T4, T5, T6, T7, TR>(LambdaExpression lambda)
Parameters
lambda
LambdaExpression
Returns
- Func<T1, T2, T3, T4, T5, T6, T7, TR>
Type Parameters
T1
T2
T3
T4
T5
T6
T7
TR
BuildWrappedFactory<TR>(Expression<Func<TR>>)
public Func<TR> BuildWrappedFactory<TR>(Expression<Func<TR>> newFunc) where TR : TypeWrapper
Parameters
newFunc
Expression<Func<TR>>
Returns
- Func<TR>
Type Parameters
TR
BuildWrappedFactory<T, TR>(Expression<Func<T, TR>>)
public Func<T, TR> BuildWrappedFactory<T, TR>(Expression<Func<T, TR>> newFunc) where TR : TypeWrapper
Parameters
newFunc
Expression<Func<T, TR>>
Returns
- Func<T, TR>
Type Parameters
T
TR
BuildWrappedFactory<T1, T2, TR>(Expression<Func<T1, T2, TR>>)
public Func<T1, T2, TR> BuildWrappedFactory<T1, T2, TR>(Expression<Func<T1, T2, TR>> newFunc) where TR : TypeWrapper
Parameters
newFunc
Expression<Func<T1, T2, TR>>
Returns
- Func<T1, T2, TR>
Type Parameters
T1
T2
TR
BuildWrappedFactory<T1, T2, T3, TR>(Expression<Func<T1, T2, T3, TR>>)
public Func<T1, T2, T3, TR> BuildWrappedFactory<T1, T2, T3, TR>(Expression<Func<T1, T2, T3, TR>> newFunc) where TR : TypeWrapper
Parameters
newFunc
Expression<Func<T1, T2, T3, TR>>
Returns
- Func<T1, T2, T3, TR>
Type Parameters
T1
T2
T3
TR
BuildWrappedFactory<T1, T2, T3, T4, TR>(Expression<Func<T1, T2, T3, T4, TR>>)
public Func<T1, T2, T3, T4, TR> BuildWrappedFactory<T1, T2, T3, T4, TR>(Expression<Func<T1, T2, T3, T4, TR>> newFunc) where TR : TypeWrapper
Parameters
newFunc
Expression<Func<T1, T2, T3, T4, TR>>
Returns
- Func<T1, T2, T3, T4, TR>
Type Parameters
T1
T2
T3
T4
TR
BuildWrappedFactory<T1, T2, T3, T4, T5, TR>(Expression<Func<T1, T2, T3, T4, T5, TR>>)
public Func<T1, T2, T3, T4, T5, TR> BuildWrappedFactory<T1, T2, T3, T4, T5, TR>(Expression<Func<T1, T2, T3, T4, T5, TR>> newFunc) where TR : TypeWrapper
Parameters
newFunc
Expression<Func<T1, T2, T3, T4, T5, TR>>
Returns
- Func<T1, T2, T3, T4, T5, TR>
Type Parameters
T1
T2
T3
T4
T5
TR
BuildWrappedFactory<T1, T2, T3, T4, T5, T6, TR>(Expression<Func<T1, T2, T3, T4, T5, T6, TR>>)
public Func<T1, T2, T3, T4, T5, T6, TR> BuildWrappedFactory<T1, T2, T3, T4, T5, T6, TR>(Expression<Func<T1, T2, T3, T4, T5, T6, TR>> newFunc) where TR : TypeWrapper
Parameters
newFunc
Expression<Func<T1, T2, T3, T4, T5, T6, TR>>
Returns
- Func<T1, T2, T3, T4, T5, T6, TR>
Type Parameters
T1
T2
T3
T4
T5
T6
TR
FinalizeMappings()
public void FinalizeMappings()
MapAction(Expression<Action>)
public Expression MapAction(Expression<Action> action)
Parameters
action
Expression<Action>
Returns
MapActionLambda(Expression<Action>)
public LambdaExpression MapActionLambda(Expression<Action> action)
Parameters
action
Expression<Action>
Returns
MapActionLambda<T>(Expression<Action<T>>)
public LambdaExpression MapActionLambda<T>(Expression<Action<T>> action)
Parameters
action
Expression<Action<T>>
Returns
Type Parameters
T
MapActionLambda<T1, T2>(Expression<Action<T1, T2>>)
public LambdaExpression MapActionLambda<T1, T2>(Expression<Action<T1, T2>> action)
Parameters
action
Expression<Action<T1, T2>>
Returns
Type Parameters
T1
T2
MapActionLambda<T1, T2, T3>(Expression<Action<T1, T2, T3>>)
public LambdaExpression MapActionLambda<T1, T2, T3>(Expression<Action<T1, T2, T3>> action)
Parameters
action
Expression<Action<T1, T2, T3>>
Returns
Type Parameters
T1
T2
T3
MapActionLambda<T1, T2, T3, T4>(Expression<Action<T1, T2, T3, T4>>)
public LambdaExpression MapActionLambda<T1, T2, T3, T4>(Expression<Action<T1, T2, T3, T4>> action)
Parameters
action
Expression<Action<T1, T2, T3, T4>>
Returns
Type Parameters
T1
T2
T3
T4
MapActionLambda<T1, T2, T3, T4, T5>(Expression<Action<T1, T2, T3, T4, T5>>)
public LambdaExpression MapActionLambda<T1, T2, T3, T4, T5>(Expression<Action<T1, T2, T3, T4, T5>> action)
Parameters
action
Expression<Action<T1, T2, T3, T4, T5>>
Returns
Type Parameters
T1
T2
T3
T4
T5
MapAction<T>(Expression<Action<T>>, Expression)
public Expression MapAction<T>(Expression<Action<T>> action, Expression p)
Parameters
action
Expression<Action<T>>p
Expression
Returns
Type Parameters
T
MapAction<T1, T2>(Expression<Action<T1, T2>>, Expression, Expression)
public Expression MapAction<T1, T2>(Expression<Action<T1, T2>> action, Expression p1, Expression p2)
Parameters
action
Expression<Action<T1, T2>>p1
Expressionp2
Expression
Returns
Type Parameters
T1
T2
MapAction<T1, T2, T3>(Expression<Action<T1, T2, T3>>, Expression, Expression, Expression)
public Expression MapAction<T1, T2, T3>(Expression<Action<T1, T2, T3>> action, Expression p1, Expression p2, Expression p3)
Parameters
action
Expression<Action<T1, T2, T3>>p1
Expressionp2
Expressionp3
Expression
Returns
Type Parameters
T1
T2
T3
MapAction<T1, T2, T3, T4>(Expression<Action<T1, T2, T3, T4>>, Expression, Expression, Expression, Expression)
public Expression MapAction<T1, T2, T3, T4>(Expression<Action<T1, T2, T3, T4>> action, Expression p1, Expression p2, Expression p3, Expression p4)
Parameters
action
Expression<Action<T1, T2, T3, T4>>p1
Expressionp2
Expressionp3
Expressionp4
Expression
Returns
Type Parameters
T1
T2
T3
T4
MapAction<T1, T2, T3, T4, T5>(Expression<Action<T1, T2, T3, T4, T5>>, Expression, Expression, Expression, Expression, Expression)
public Expression MapAction<T1, T2, T3, T4, T5>(Expression<Action<T1, T2, T3, T4, T5>> action, Expression p1, Expression p2, Expression p3, Expression p4, Expression p5)
Parameters
action
Expression<Action<T1, T2, T3, T4, T5>>p1
Expressionp2
Expressionp3
Expressionp4
Expressionp5
Expression
Returns
Type Parameters
T1
T2
T3
T4
T5
MapExpression<TR>(Expression<Func<TR>>)
public Expression MapExpression<TR>(Expression<Func<TR>> func)
Parameters
func
Expression<Func<TR>>
Returns
Type Parameters
TR
MapExpression<T, TR>(Expression<Func<T, TR>>, Expression)
public Expression MapExpression<T, TR>(Expression<Func<T, TR>> func, Expression p)
Parameters
func
Expression<Func<T, TR>>p
Expression
Returns
Type Parameters
T
TR
MapExpression<T1, T2, TR>(Expression<Func<T1, T2, TR>>, Expression, Expression)
public Expression MapExpression<T1, T2, TR>(Expression<Func<T1, T2, TR>> func, Expression p1, Expression p2)
Parameters
func
Expression<Func<T1, T2, TR>>p1
Expressionp2
Expression
Returns
Type Parameters
T1
T2
TR
MapExpression<T1, T2, T3, TR>(Expression<Func<T1, T2, T3, TR>>, Expression, Expression, Expression)
public Expression MapExpression<T1, T2, T3, TR>(Expression<Func<T1, T2, T3, TR>> func, Expression p1, Expression p2, Expression p3)
Parameters
func
Expression<Func<T1, T2, T3, TR>>p1
Expressionp2
Expressionp3
Expression
Returns
Type Parameters
T1
T2
T3
TR
MapExpression<T1, T2, T3, T4, TR>(Expression<Func<T1, T2, T3, T4, TR>>, Expression, Expression, Expression, Expression)
public Expression MapExpression<T1, T2, T3, T4, TR>(Expression<Func<T1, T2, T3, T4, TR>> func, Expression p1, Expression p2, Expression p3, Expression p4)
Parameters
func
Expression<Func<T1, T2, T3, T4, TR>>p1
Expressionp2
Expressionp3
Expressionp4
Expression
Returns
Type Parameters
T1
T2
T3
T4
TR
MapExpression<T1, T2, T3, T4, T5, TR>(Expression<Func<T1, T2, T3, T4, T5, TR>>, Expression, Expression, Expression, Expression, Expression)
public Expression MapExpression<T1, T2, T3, T4, T5, TR>(Expression<Func<T1, T2, T3, T4, T5, TR>> func, Expression p1, Expression p2, Expression p3, Expression p4, Expression p5)
Parameters
func
Expression<Func<T1, T2, T3, T4, T5, TR>>p1
Expressionp2
Expressionp3
Expressionp4
Expressionp5
Expression
Returns
Type Parameters
T1
T2
T3
T4
T5
TR
MapLambda<T, TR>(Expression<Func<T, TR>>)
public LambdaExpression MapLambda<T, TR>(Expression<Func<T, TR>> func)
Parameters
func
Expression<Func<T, TR>>
Returns
Type Parameters
T
TR
MapLambda<T1, T2, TR>(Expression<Func<T1, T2, TR>>)
public LambdaExpression MapLambda<T1, T2, TR>(Expression<Func<T1, T2, TR>> func)
Parameters
func
Expression<Func<T1, T2, TR>>
Returns
Type Parameters
T1
T2
TR
MapLambda<T1, T2, T3, TR>(Expression<Func<T1, T2, T3, TR>>)
public LambdaExpression MapLambda<T1, T2, T3, TR>(Expression<Func<T1, T2, T3, TR>> func)
Parameters
func
Expression<Func<T1, T2, T3, TR>>
Returns
Type Parameters
T1
T2
T3
TR
MapLambda<T1, T2, T3, T4, TR>(Expression<Func<T1, T2, T3, T4, TR>>)
public LambdaExpression MapLambda<T1, T2, T3, T4, TR>(Expression<Func<T1, T2, T3, T4, TR>> func)
Parameters
func
Expression<Func<T1, T2, T3, T4, TR>>
Returns
Type Parameters
T1
T2
T3
T4
TR
MapLambda<T1, T2, T3, T4, T5, TR>(Expression<Func<T1, T2, T3, T4, T5, TR>>)
public LambdaExpression MapLambda<T1, T2, T3, T4, T5, TR>(Expression<Func<T1, T2, T3, T4, T5, TR>> func)
Parameters
func
Expression<Func<T1, T2, T3, T4, T5, TR>>
Returns
Type Parameters
T1
T2
T3
T4
T5
TR
MapLambda<T1, T2, T3, T4, T5, T6, TR>(Expression<Func<T1, T2, T3, T4, T5, T6, TR>>)
public LambdaExpression MapLambda<T1, T2, T3, T4, T5, T6, TR>(Expression<Func<T1, T2, T3, T4, T5, T6, TR>> func)
Parameters
func
Expression<Func<T1, T2, T3, T4, T5, T6, TR>>
Returns
Type Parameters
T1
T2
T3
T4
T5
T6
TR
MapLambda<T1, T2, T3, T4, T5, T6, T7, TR>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TR>>)
public LambdaExpression MapLambda<T1, T2, T3, T4, T5, T6, T7, TR>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TR>> func)
Parameters
func
Expression<Func<T1, T2, T3, T4, T5, T6, T7, TR>>
Returns
Type Parameters
T1
T2
T3
T4
T5
T6
T7
TR
RegisterTypeWrapper(Type, Type)
public void RegisterTypeWrapper(Type wrapperType, Type originalType)
Parameters
RegisterTypeWrapper<TWrapper>(Type)
public void RegisterTypeWrapper<TWrapper>(Type originalType)
Parameters
originalType
Type
Type Parameters
TWrapper
Type<T>()
public TypeMapper.TypeBuilder<T> Type<T>()
Returns
Type Parameters
T
WrapTask<TR>(Task, Type, CancellationToken)
public Task<TR?> WrapTask<TR>(Task instanceTask, Type instanceType, CancellationToken cancellationToken) where TR : TypeWrapper
Parameters
instanceTask
TaskinstanceType
TypecancellationToken
CancellationToken
Returns
- Task<TR>
Type Parameters
TR
Wrap<TR>(object?)
public TR? Wrap<TR>(object? instance) where TR : TypeWrapper
Parameters
instance
object
Returns
- TR
Type Parameters
TR