示例#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);
        }