Example #1
0
 public TestEventsContext(
     EventsContextOptions options,
     IRootAppServiceProvider rootAppServiceProvider,
     TestRunParameters parameters
     )
     : base(options, rootAppServiceProvider)
 {
     _parameters = parameters;
 }
Example #2
0
 /// <summary>
 ///     Creates a new <see cref="EventsContext"/>
 /// </summary>
 /// <param name="options">The options for this context.</param>
 /// <param name="rootAppServiceProvider">The application root service provider.</param>
 protected EventsContext(
     EventsContextOptions options,
     IRootAppServiceProvider rootAppServiceProvider
     )
 {
     _internalEventsContext = new Lazy <InternalEventsContext>(() => new InternalEventsContext(
                                                                   options,
                                                                   OnConfiguring,
                                                                   OnBuildingPipelines,
                                                                   OnBuildingSubscriptions,
                                                                   rootAppServiceProvider,
                                                                   this
                                                                   ), LazyThreadSafetyMode.ExecutionAndPublication);
 }
        public InternalEventsContext(
            EventsContextOptions options,
            Action <EventsContextOptions> onConfiguring,
            Action <IPipelinesBuilder> onBuildingPipelines,
            Action <SubscriptionsBuilder> onBuildingSubscriptions,
            IRootAppServiceProvider rootAppServiceProvider,
            IEventsContext eventsContext
            )
        {
            _options                 = options;
            _onConfiguring           = onConfiguring;
            _onBuildingPipelines     = onBuildingPipelines;
            _onBuildingSubscriptions = onBuildingSubscriptions;

            Configure();
            var internalServices = new InternalServiceCollection(rootAppServiceProvider);

            _internalServiceProvider = internalServices.BuildServiceProvider(eventsContext, _options);
            Build();
        }
Example #4
0
 public TestEventsContext2(EventsContextOptions options, IRootAppServiceProvider rootAppServiceProvider)
     : base(options, rootAppServiceProvider)
 {
 }
 public InternalServiceCollection(IRootAppServiceProvider rootAppServiceProvider)
 {
     _rootAppServiceProvider = rootAppServiceProvider;
 }
Example #6
0
 public GlobalSubscriptionsService(IRootAppServiceProvider rootAppServiceProvider)
 {
     _globalSubscriptions       = new ConcurrentDictionary <Subscription, bool>();
     _subscriptionCreationTasks = new ConcurrentQueue <ISubscriptionCreationTask>();
     _rootAppServiceProvider    = rootAppServiceProvider;
 }