public static IAccessor <T> Apply <T, K>(this IAccessor <T> accessor, Expression <Func <IReturnableMember <T>, K> > returner, Expression <Action <IApplicableMember <K> > > actor) { if (accessor == null) { throw new NullReferenceException(); } if (returner == null) { throw new ArgumentNullException("returner"); } if (actor == null) { throw new ArgumentNullException("actor"); } return(new AccessorImpl <T>(ApplyCore <T, K>(accessor.Expression, ReflectionBuilder.ReturnableMember <T, K>(returner), ReflectionBuilder.ApplicableMember <K>(actor)))); }
//public static IAccessor<T> Return<T, K>(this IAccessor<T> accessor, Expression<Action<IReturnableMember<T>>> returner, Expression<Func<IValue<T>, K>> parameter) //{ // if (accessor == null) // throw new NullReferenceException(); // if (returner == null) // throw new ArgumentNullException("returner"); // if (parameter == null) // throw new ArgumentNullException("parameter"); // return new AccessorImpl<T>(ReturnCore<T, K>(accessor.Expression, ReflectionBuilder.ReturnableMember<T, K>(returner), ReflectionBuilder.GetParameter<T, K>(parameter))); //} public static IAccessor <T> Return <T, K>(this IAccessor <T> accessor, Expression <Func <IReturnableMember <T>, K> > returner, Expression <Func <IValue <T>, K> > parameter) { if (accessor == null) { throw new NullReferenceException(); } if (returner == null) { throw new ArgumentNullException("returner"); } if (parameter == null) { throw new ArgumentNullException("parameter"); } return(new AccessorImpl <T>(ReturnCore <T, K>(accessor.Expression, ReflectionBuilder.ReturnableMember <T, K>(returner), ReflectionBuilder.GetParameter <T, K>(parameter)))); }
public static ICopier <T, R> Copy <T, R, K>(this ICopier <T, R> copier, Expression <Func <IReturnableMember <T>, K> > source, Expression <Func <IAssignableMember <R>, K> > target) { return(new CopierImpl <T, R>(CopyCore <T, R, K>(copier.Expression, ReflectionBuilder.ReturnableMember <T, K>(source), ReflectionBuilder.AssignableMember <R, K>(target)))); }
public static IConverter <T, N> Convert <T, R, N>(this IConverter <T, R> converter, Expression <Func <IReturnableMember <R>, N> > returnMember) { return(new ConverterImpl <T, N>(SelectCore(converter.Expression, ReflectionBuilder.ReturnableMember <R, N>(returnMember)))); }
public static IConverter <T, R> Convert <T, R>(this IAccessor <T> accessor, Expression <Func <IReturnableMember <T>, R> > returnMember) { return(new ConverterImpl <T, R>(SelectCore(accessor.Expression, ReflectionBuilder.ReturnableMember <T, R>(returnMember)))); }