Class DelegateAdjuster
Adjusts System.Linq.Expressions.Expression using System.Linq.Expressions.Expression.Convert(System.Linq.Expressions.Expression,System.Type)
Inheritance
System.Object
DelegateAdjuster
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Cqrs.Infrastructure
Assembly: Cqrs.dll
Syntax
public static class DelegateAdjuster
Methods
CastArgument<TBase, TDerived>(Expression<Action<TDerived>>)
If TDerived
equals TBase
then source
is compiled using System.Linq.Expressions.Expression`1.Compile
Otherwise source
is converted to type TDerived
from TBase
Declaration
public static Action<TBase> CastArgument<TBase, TDerived>(Expression<Action<TDerived>> source)where TDerived : TBase
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression<System.Action<TDerived>> | source | The delegate to adjust. |
Returns
Type | Description |
---|---|
System.Action<TBase> |
Type Parameters
Name | Description |
---|---|
TBase | The source System.Type. |
TDerived | The target System.Type. |