Пример #1
0
        public virtual void Initialize(IServiceProvider serviceProvider)
        {
            MessageBus     = serviceProvider.GetService <IMessageBus>();
            JsonSerializer = serviceProvider.GetService <JsonSerializer>();
            LoggerFactory  = serviceProvider.GetService <ILoggerFactory>();
            Counters       = serviceProvider.GetService <IPerformanceCounterManager>();
            AckHandler     = serviceProvider.GetService <IAckHandler>();
            ProtectedData  = serviceProvider.GetService <IProtectedData>();
            UserIdProvider = serviceProvider.GetService <IUserIdProvider>();
            Pool           = serviceProvider.GetService <IMemoryPool>();

            _options          = serviceProvider.GetService <IOptionsAccessor <SignalROptions> >().Options;
            _transportManager = serviceProvider.GetService <ITransportManager>();
        }
        public virtual void Initialize(IServiceProvider serviceProvider)
        {
            MessageBus = serviceProvider.GetRequiredService<IMessageBus>();
            JsonSerializer = serviceProvider.GetRequiredService<JsonSerializer>();
            LoggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();
            Counters = serviceProvider.GetRequiredService<IPerformanceCounterManager>();
            AckHandler = serviceProvider.GetRequiredService<IAckHandler>();
            ProtectedData = serviceProvider.GetRequiredService<IProtectedData>();
            UserIdProvider = serviceProvider.GetRequiredService<IUserIdProvider>();
            Pool = serviceProvider.GetRequiredService<IMemoryPool>();

            _options = serviceProvider.GetRequiredService<IOptions<SignalROptions>>().Value;
            _transportManager = serviceProvider.GetRequiredService<ITransportManager>();

            // Ensure that this server is listening for any ACKs sent over the bus.
            serviceProvider.GetRequiredService<AckSubscriber>();
        }
Пример #3
0
        public virtual void Initialize(IServiceProvider serviceProvider)
        {
            MessageBus     = serviceProvider.GetRequiredService <IMessageBus>();
            JsonSerializer = serviceProvider.GetRequiredService <JsonSerializer>();
            LoggerFactory  = serviceProvider.GetRequiredService <ILoggerFactory>();
            Counters       = serviceProvider.GetRequiredService <IPerformanceCounterManager>();
            AckHandler     = serviceProvider.GetRequiredService <IAckHandler>();
            ProtectedData  = serviceProvider.GetRequiredService <IProtectedData>();
            UserIdProvider = serviceProvider.GetRequiredService <IUserIdProvider>();
            Pool           = serviceProvider.GetRequiredService <IMemoryPool>();

            _options          = serviceProvider.GetRequiredService <IOptions <SignalROptions> >().Options;
            _transportManager = serviceProvider.GetRequiredService <ITransportManager>();

            // Ensure that this server is listening for any ACKs sent over the bus.
            serviceProvider.GetRequiredService <AckSubscriber>();
        }