Class TypeWrapper
- Namespace
- LinqToDB.Expressions
- Assembly
- linq2db.dll
Implements base class for typed wrappers over provider-specific type.
public class TypeWrapper
- Inheritance
-
TypeWrapper
- Derived
- Extension Methods
Constructors
TypeWrapper()
This constructor is never called and used only as base constructor for constructor signatures in child class.
protected TypeWrapper()
TypeWrapper(object, Delegate[]?)
This is real constructor for wrapper class.
protected TypeWrapper(object instance, Delegate[]? wrappers)
Parameters
instance
objectInstance of wrapped provider-specific type.
wrappers
Delegate[]Built delegates for wrapper to call base wrapped type functionality.
Properties
CompiledWrappers
Provides access to delegates, created from expressions, defined in wrapper class using following property and type mappings, configured for TypeMapper:
private static IEumerable<T> Wrappers { get; }
where T could be LambdaExpression or true
.
This could be used to map optional API, that present only in specific versions of provider.
If wrapper doesn't need any wrapper delegates, this property could be ommited.
protected Delegate[] CompiledWrappers { get; }
Property Value
- Delegate[]
instance_
Gets underlying provider-specific object, used by wrapper.
public object instance_ { get; }
Property Value
Methods
PropertySetter<TI, TP>(Expression<Func<TI, TP>>)
Creates property setter expression from property getter. Limitation: property should have getter.
protected static Expression<Action<TI, TP>> PropertySetter<TI, TP>(Expression<Func<TI, TP>> getter)
Parameters
getter
Expression<Func<TI, TP>>
Returns
- Expression<Action<TI, TP>>
Type Parameters
TI
TP