/// <summary> /// Creates a new computation source from a transformation rule /// </summary> /// <typeparam name="TInput1">The type of the first input arguments for the transformation rule</typeparam> /// <typeparam name="TInput2">The type of the second input arguments for the transformation rule</typeparam> /// <param name="rule">The rule that should be taken as a source of computation objects</param> /// <returns>A source of computations that can further be dealt with</returns> public static Func <ITransformationContext, INotifyEnumerable <InPlaceComputationWrapper <TInput1, TInput2> > > ToComputationSource <TInput1, TInput2>(this InPlaceTransformationRuleBase <TInput1, TInput2> rule) where TInput1 : class where TInput2 : class { if (rule == null) { throw new ArgumentNullException("rule"); } return(context => rule.ToComputationSource(context)); }
/// <summary> /// Creates a new computation source from a transformation rule /// </summary> /// <typeparam name="TInput">The type of the input arguments for the transformation rule</typeparam> /// <param name="rule">The rule that should be taken as a source of computation objects</param> /// <param name="allowNull">A boolean value indicating whether null values should be allowed</param> /// <param name="filter">A method or lambda expression to filter the computation objects</param> /// <returns>A source of computations that can further be dealt with</returns> public static Func <ITransformationContext, INotifyEnumerable <InPlaceComputationWrapper <TInput> > > ToComputationSource <TInput>(this InPlaceTransformationRuleBase <TInput> rule, bool allowNull, Func <InPlaceComputationWrapper <TInput>, bool> filter) where TInput : class { if (rule == null) { throw new ArgumentNullException("rule"); } return(context => rule.ToComputationSource(context, allowNull, filter)); }