Beispiel #1
0
            private MockDependencyResolver()
            {
                ContextFactory       = new ThreadedContextItemCollectionFactory();
                CorrelationIdHelper  = new CorrelationIdHelper((ThreadedContextItemCollectionFactory)ContextFactory);
                ConfigurationManager = new ConfigurationManager();
                Logger     = new TraceLogger(new LoggerSettings(), CorrelationIdHelper);
                EventStore = EventStoreCreator(this);

                Bus = new InProcessBus <TAuthenticationToken>
                      (
                    (IAuthenticationTokenHelper <TAuthenticationToken>) new DefaultAuthenticationTokenHelper(ContextFactory),
                    CorrelationIdHelper,
                    this,
                    Logger,
                    ConfigurationManager,
                    new BusHelper(ConfigurationManager, ContextFactory)
                      );

                AggregateRepository = new AggregateRepository <TAuthenticationToken>
                                      (
                    new AggregateFactory(this, Logger),
                    EventStore,
                    Bus,
                    CorrelationIdHelper,
                    ConfigurationManager
                                      );
            }
 /// <summary>
 /// Instantiates a new instance of the <see cref="CorrelationIdHelper"/> class requiring <paramref name="contextItemCollectionFactory"/>, used to set <see cref="ContextItemCollection"/> with an instance.
 /// </summary>
 public CorrelationIdHelper(ThreadedContextItemCollectionFactory contextItemCollectionFactory)
 {
     ContextItemCollection = contextItemCollectionFactory.GetCurrentContext();
 }