public ChannelManagerActor(IServiceProvider serviceProvider)
        {
            this.ServiceProvider = serviceProvider;

            Logger             = Context.GetLogger();
            _HttpClientFactory = serviceProvider.GetService <IHttpClientFactory>();

            _ChatLogger = ChatLoggerActor.Create(serviceProvider.GetService <IHubContext <LoggerHub, IChatLogger> >());

            CreateFollowerActor();
            _ChannelConfigurationActor = Context.ActorOf(
                Props.Create <ChannelConfigurationActor>(
                    serviceProvider.GetService <IChannelConfigurationContext>(),
                    _HttpClientFactory),
                nameof(ChannelConfigurationActor));

            ConfigureMessageReceiveStatements();

            CreateSubscriptionManagerActor();

            //Receive<GetFeatureForChannel>(async f => {
            //	var theChannelActor = _ChannelActors[f.Channel];
            //	Sender.Tell(await theChannelActor.Ask(new GetFeatureFromChannel(f.FeatureType)));
            //});
        }
		public ChannelManagerActor(IChannelConfigurationContext dataContext, IHubContext<LoggerHub, IChatLogger> chatLogger) {

			Logger = Context.GetLogger();

			_ChatLogger = ChatLoggerActor.Create(chatLogger);

			Receive<JoinChannel>(this.GetChannelActor);
			Receive<ReportCurrentChannels>(_ => {
				Sender.Tell(_ChannelActors.Select(kv => kv.Key).ToArray());
			});
			this.DataContext = dataContext;

		}
        public ChannelManagerActor(IServiceProvider serviceProvider)
        {
            this.ServiceProvider = serviceProvider;

            Logger             = Context.GetLogger();
            _HttpClientFactory = serviceProvider.GetService <IHttpClientFactory>();

            _ChatLogger = ChatLoggerActor.Create(serviceProvider.GetService <IHubContext <LoggerHub, IChatLogger> >());

            CreateFollowerActor();
            _ChannelConfigurationActor = Context.ActorOf(
                Props.Create <ChannelConfigurationActor>(
                    serviceProvider.GetService <IChannelConfigurationContext>(),
                    _HttpClientFactory),
                nameof(ChannelConfigurationActor));

            Receive <JoinChannel>(this.GetChannelActor);
            Receive <ReportCurrentChannels>(_ => {
                Sender.Tell(_ChannelActors.Select(kv => kv.Key).ToArray());
            });
            Receive <OnNewFollowersDetectedArgs>(args => {
                _ChannelActors[args.Channel].Tell(args);
            });
            Receive <NotifyChannelOfConfigurationUpdate>(UpdateChannelWithConfiguration);

            Receive <GetConfigurationForChannel>(msg =>
            {
                var config = _ChannelConfigurationActor.Ask <ChannelConfiguration>(msg);
                Sender.Tell(config);
            });

            //Receive<GetFeatureForChannel>(async f => {
            //	var theChannelActor = _ChannelActors[f.Channel];
            //	Sender.Tell(await theChannelActor.Ask(new GetFeatureFromChannel(f.FeatureType)));
            //});
        }