Beispiel #1
0
            public void ConcreteType()
            {
                IQueryHandlerCollection collection = new DefaultQueryDispatcher();

                IReflectionService reflectionService = ReflectionFactory.FromCurrentAppDomain();

                using (ITypeExecutorService executorService = reflectionService.PrepareTypeExecutors())
                {
                    executorService.AddQueryHandlers(collection);
                }

                IQueryHandler <Q3, R3> handler3;

                Assert.AreEqual(true, collection.TryGet(out handler3));
                IQueryHandler <Q4, R4> handler4;

                Assert.AreEqual(false, collection.TryGet(out handler4));
            }
Beispiel #2
0
            public void Base()
            {
                IQueryHandlerCollection collection = new DefaultQueryDispatcher();

                IReflectionService reflectionService = ReflectionFactory.FromCurrentAppDomain();

                using (ITypeExecutorService executorService = reflectionService.PrepareTypeExecutors())
                {
                    executorService.AddQueryHandlers(collection);
                }

                IQueryHandler <Q1, R1> handler1;

                Assert.AreEqual(true, collection.TryGet(out handler1));
                IQueryHandler <Q2, R2> handler2;

                Assert.AreEqual(true, collection.TryGet(out handler2));
            }