コード例 #1
0
 /// <inheritdoc />
 public void RegisterDefaults(IDependencyContainer container)
 {
     container.RegisterDefault <IFlowProvider, FlowProvider>();
     container.RegisterDefault <IFlowStarter, FlowStarter>();
     container.RegisterDefault <IFlowHandler, FlowProvider>();
     container.RegisterDefaultSingleton(() => flowRepository ?? new NonPersistentFlowRepository());
     container.RegisterDefaultSingleton <IFlowStore, FlowStore>();
 }
コード例 #2
0
ファイル: ExampleConsoleApp.cs プロジェクト: MvRens/Tapeti
        /// <param name="dependencyResolver">Uses Tapeti's IDependencyContainer interface so you can easily switch an example to your favourite IoC container</param>
        /// <param name="expectedDoneCount"></param>
        public ExampleConsoleApp(IDependencyContainer dependencyResolver, int expectedDoneCount = 1)
        {
            this.dependencyResolver = dependencyResolver;
            this.expectedDoneCount  = expectedDoneCount;

            dependencyResolver.RegisterDefault <IExampleState>(() => new ExampleState(this));
        }
コード例 #3
0
 /// <inheritdoc />
 public void RegisterDefaults(IDependencyContainer container)
 {
     container.RegisterDefaultSingleton(router);
     container.RegisterDefault <ITransientPublisher, TransientPublisher>();
 }
コード例 #4
0
 public void RegisterDefaults(IDependencyContainer container)
 {
     container.RegisterDefault <IFlowRepository>(() => new SqlConnectionFlowRepository(connectionString, serviceId, schema));
 }