public static EventSourceConfiguration SetServiceProviderActivator(this EventSourceConfiguration config)
        {
            var activator = new ServiceCollectionActivator();

            config.Activator      = activator;
            config.StateActivator = activator;
            return(config);
        }
Example #2
0
        public static IServiceCollection AddServiceProviderDomainObjectAcitvator(this IServiceCollection services)
        {
            services
            .TryAddSingleton <EventsourceDIContext>(x =>
            {
                var activator = new ServiceCollectionActivator(x.GetRequiredService <IServiceProvider>());
                return(new EventsourceDIContext(activator, activator));
            });


            return(services);
        }