private FmFactoryEngine(IIoC ioc) { _ioc = ioc; _log = ioc.Resolve<ILogFile>(); _sink = ioc.Resolve<IIoSink>(); _agent = ioc.Resolve<IFunnelsAgent>(); }
private IoThreads(IIoC ioc) { _log = ioc.Resolve<ILogFile>(); _funnels = ioc.Resolve<IFunnelsManagerEx>(); _config = ioc.Resolve<IFmConfigRa>(); _pool = create_threads(_config.Config.Client.SinkThreadsCount); }
/// <summary> /// Creates an instance of type T. Any interface dependencies will be replaced with mocks. /// </summary> /// <typeparam name="T">The type to create.</typeparam> /// <returns>An instance of T.</returns> public virtual T Create <T>() { ResolveType = typeof(T); var result = ioc.Resolve <T>(); ResolveType = null; return(result); }
private RemoteDispatcher(string myself, IIoC ioc) { _myself = myself; _counters = new Counters(); _log = ioc.Resolve<ILogFile>(); _json = ioc.Resolve<IJsonEngine>(); _rrepo = ioc.Resolve<IRemoteRepo>(); _messenger = ioc.Resolve<IMessengerEngine>(); }
private FunnelsShop(StoreInfo info, IIoC ioc) { _info = info; _sink = ioc.Resolve<IIoSink>(); _que = ioc.Resolve<IIoQueue>(); _io = ioc.Resolve<IIoConnector>(); _writer = IoWriter.New(ioc, info); _reader = IoReader.New(ioc, info); }
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 void BuildThisByAskingTheContainerForIt(Type type) { try { ioc.Resolve(type); } catch { // ignored } }
private HelloPulseBeat(IIoC ioc, Config myConfig) { _myConfig = myConfig; _signals = ioc.Resolve<ISignalsManagerEx>(); var configRa = ioc.Resolve<ISignalsConfigRa>(); var config = configRa.Values; _log = ThrottledLog.NewSync(config.ThrottledLogTtl, ioc.Resolve<ILogFile>()); _period = config.Client.HelloMsgPeriod; _timer = new Timer(pulse); }
private FunnelsAgent(IIoC ioc) { _log = ioc.Resolve<ILogFile>(); _config = ioc.Resolve<IFmConfigRa>(); var agentId = Guid.NewGuid(); int port = find_free_port(); var uri = _config.MakeAgentUri(agentId, port); _info = new AgentInfo {AgentId = agentId, Uri = uri}; var funnels = ioc.Resolve<IFunnelsManagerEx>(); var target = wcf.FunnelsAgent.New(funnels); _host = WcfHost<comm.IFunnelsAgent>.NewAsync(_log, target); }
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(); }
/// <summary> /// The main entry point for the application. /// </summary> static async Task Main() { SetupInversionOfControl(); DatabaseExporterWindowsService service = _ioc.Resolve <DatabaseExporterWindowsService>(); if (Environment.UserInteractive) { await service.StartServiceAsync(Enumerable.Empty <string>().ToArray()); Console.WriteLine("Press any key to exit..."); Console.ReadKey(); } else { ServiceBase.Run(service); } }
static void Main(string[] args) { SetupInversionOfControl(); var encryptor = _ioc.Resolve <RsaCertificateEncryptor>(); var arg = args.FirstOrDefault(); if (arg == null) { return; } var encrypted = encryptor.Encrypt(arg); Clipboard.SetText(encrypted); Console.WriteLine(string.Empty); Console.WriteLine(string.Empty); Console.WriteLine(string.Empty); Console.WriteLine(string.Empty); Console.ForegroundColor = ConsoleColor.DarkCyan; Console.WriteLine(encrypted); Console.WriteLine(string.Empty); Console.WriteLine(string.Empty); Console.WriteLine(string.Empty); Console.WriteLine(string.Empty); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Code copied to clipboard !!!"); Console.ResetColor(); Console.WriteLine(string.Empty); Console.WriteLine(string.Empty); }
private AgentConnector(IIoC ioc) { _counters = new Counters(); _log = ioc.Resolve<ILogFile>(); }
private void RegisterThisMockWithAutoMoq(Type type, Mock mock) { _ioc.Resolve <AutoMoqer>().SetMock(type, mock); }
private AgentsEngine(IIoC ioc) { _log = ioc.Resolve<ILogFile>(); _repo = ioc.Resolve<IHubRepo>(); _messenger = ioc.Resolve<IMessengerEngine>(); }
protected ConductorViewModel(IIoC ioc) : this(ioc, ioc.Resolve <IWindowManager>()) { }
private JsonEngine(IIoC ioc) { _log = ioc.Resolve<ILogFile>(); }
public PartInvoiceController(IIoC ioc) { __CustomerRepositoryDB = ioc.Resolve <ICustomerRepositoryDB>(); __PartInvoiceRepositoryDB = ioc.Resolve <IPartInvoiceRepositoryDB>(); __IPartAvailabilityService = ioc.Resolve <Services.PartAvailabilityService.IPartAvailabilityService>(); }
private IoWriter(IIoC ioc, StoreInfo info) { _log = ioc.Resolve<ILogFile>(); _io = ioc.Resolve<IIoConnector>(); _info = info; }
protected ScreenViewModel(IIoC ioc) : this(ioc, ioc.Resolve <IWindowManager>()) { }
private FunnelsResolver(IIoC ioc) { _log = ioc.Resolve<ILogFile>(); }
protected ConductorViewModel(IIoC ioc, IWindowManager windowManager) : this(ioc, windowManager, ioc.Resolve <IMessageBus>(), ioc.Resolve <ILogger>()) { }
private LocalDispatcher(IIoC ioc) { _counters = new Counters(); _log = ioc.Resolve<ILogFile>(); _lrepo = ioc.Resolve<ILocalRepo>(); }
private IoSink(IIoC ioc) { _log = ioc.Resolve<ILogFile>(); _que = ioc.Resolve<IIoQueue>(); _counters = new Counters(); }