Пример #1
0
 public static BindOptions <TType, TInterface> MapProperty <TType, TInterface, TResult>
 (
     this BindOptions <TType, TInterface> bindOptions,
     Expression <Func <TType, TResult> > targetMethodExpression,
     Expression <Func <TInterface, TResult> > interfaceMethodExpression
 )
 => bindOptions.MapProperty <TType, TInterface, TResult>
 (
     targetMethodExpression,
     (LambdaExpression)interfaceMethodExpression
 );
Пример #2
0
 private static BindOptions <TType, TInterface> MapProperty <TType, TInterface, TResult>
 (
     this BindOptions <TType, TInterface> bindOptions,
     LambdaExpression targetMethodExpression,
     LambdaExpression interfaceMethodExpression
 )
 => bindOptions.MapChain
 (
     targetProperty: targetMethodExpression.FetchMemberInfo <PropertyInfo>(),
     interfaceProperty: interfaceMethodExpression.FetchMemberInfo <PropertyInfo>()
 );
Пример #3
0
 private static BindOptions <TType, TInterface> MapMethod <TType, TInterface>
 (
     this BindOptions <TType, TInterface> bindOptions,
     LambdaExpression targetMethodExpression,
     LambdaExpression interfaceMethodExpression
 )
 => bindOptions.MapChain
 (
     targetMethod: targetMethodExpression.FetchMethodCall(),
     interfaceMethod: interfaceMethodExpression.FetchMethodCall()
 );
Пример #4
0
 public static BindOptions <TType, TInterface> MapMethod <TType, TInterface>
 (
     this BindOptions <TType, TInterface> bindOptions,
     Expression <Action <TType> > targetMethodExpression,
     Expression <Action <TInterface> > interfaceMethodExpression
 )
 => bindOptions
 .MapMethod
 (
     targetMethodExpression,
     (LambdaExpression)interfaceMethodExpression
 );
Пример #5
0
        public static BindOptions <TType, TInterface> MapChain <TType, TInterface>
        (
            this BindOptions <TType, TInterface> bindOptions,
            MethodInfo targetMethod,
            MethodInfo interfaceMethod
        )
        {
            bindOptions.Map
            (
                targetMethod,
                interfaceMethod
            );

            return(bindOptions);
        }
Пример #6
0
        public static BindOptions <TType, TInterface> MapChain <TType, TInterface>
        (
            this BindOptions <TType, TInterface> bindOptions,
            PropertyInfo targetProperty,
            PropertyInfo interfaceProperty
        )
        {
            bindOptions.Map
            (
                targetProperty,
                interfaceProperty
            );

            return(bindOptions);
        }