Esempio n. 1
0
        public static DependencyCollection CreateQueryProcessor <TQuery, TResult>(this DependencyCollection dependencies,
                                                                                  Func <TQuery, TResult> processor)
            where TQuery : IQuery <TResult>
        {
            var instance = new ActionQueryProcessor <TQuery, TResult>(processor);

            return(dependencies.AddInstance <IQueryProcessor <TQuery, TResult> >(instance));
        }
Esempio n. 2
0
 public ActionQueryProcessorShould()
 {
     _action    = new Mock <Func <Query, Boo> >();
     _query     = Fixture.Create <Query>();
     _processor = new ActionQueryProcessor <Query, Boo>(_action.Object);
 }