private SignalsAgent(IIoC ioc) { _log = ioc.Resolve<ILogFile>(); _configRa = ioc.Resolve<ISignalsConfigRa>(); _signals = ioc.Resolve<ISignalsManagerEx>(); _agentUri = make_agent_uri(_configRa.Values); var target = wcf.SignalsAgent.New(this); _host = WcfHost<comm.ISignalsAgent>.NewAsync(_log, target); }
private SignalsHub(SignalsConfig config) { _counters = new Counters(); var ioc = create_dependencies(config); _log = ioc.Resolve<ILogFile>(); _repo = ioc.Resolve<IHubRepo>(); _configRa = ioc.Resolve<ISignalsConfigRa>(); _messenger = ioc.Resolve<IMessengerEngine>(); _agents = ioc.Resolve<IAgentsEngine>(); _idler = ioc.Resolve<IIdler>(); _scheduler = ioc.Resolve<IEventScheduler>(); var target = wcf.SignalsHub.New(this); _host = WcfHost<comm.ISignalsHub>.NewAsync(_log, target); _serviceName = GetType().AsServiceName(); }
private MessengerEngine(IIoC ioc) { _msg2failureHandler = new Dictionary<Type, Action<comm.IoMsg>> { {typeof(comm.PublishMsg), msg => update_failure_counters((comm.PublishMsg) msg)}, {typeof(comm.FilterInfo), msg => update_failure_counters((comm.FilterInfo) msg)}, {typeof(comm.TopicFilterMsg), msg => update_failure_counters((comm.TopicFilterMsg) msg)}, {typeof(comm.HeartbeatMsg), msg => update_failure_counters((comm.HeartbeatMsg) msg)} }; _counters = new Counters(); _configRa = ioc.Resolve<ISignalsConfigRa>(); var config = _configRa.Values; _cachedConfig = config; _log = ThrottledLog.NewSync(config.ThrottledLogTtl, ioc.Resolve<ILogFile>()); _hubUri = _configRa.MakeHubUri(); _connector = ioc.Resolve<IAgentConnector>(); _agents = AgentsRepo.NewSync(); }