private void Infrastructure() { Bind<IMessageService>().To<MessageService>().InSingletonScope(); Bind<IEventService>().To<EventService>().InSingletonScope(); Bind<CommonServices>().ToSelf().InSingletonScope(); Bind<IFileSystem>().To<FileSystemService>().InSingletonScope(); Bind<IProcesses>().To<Processes>().InSingletonScope(); Bind<IThreadPoolExecute>().To<ThreadPoolExecute>(); var exe = new DispatcherExecute(); exe.InitializeWithDispatcher(); Bind<IDispatcherExecute>().ToConstant(exe); Kernel.InjectFuncFactory(() => DateTime.Now); }
private void Infrastructure() { Bind <IMessageService>().To <MessageService>().InSingletonScope(); Bind <IEventService>().To <EventService>().InSingletonScope(); Bind <CommonServices>().ToSelf().InSingletonScope(); Bind <IFileSystem>().To <FileSystemService>().InSingletonScope(); Bind <IProcesses>().To <Processes>().InSingletonScope(); Bind <IThreadPoolExecute>().To <ThreadPoolExecute>(); var exe = new DispatcherExecute(); exe.InitializeWithDispatcher(); Bind <IDispatcherExecute>().ToConstant(exe); Kernel.InjectFuncFactory(() => DateTime.Now); }