/// <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>(); }
/// <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)); }
/// <inheritdoc /> public void RegisterDefaults(IDependencyContainer container) { container.RegisterDefaultSingleton(router); container.RegisterDefault <ITransientPublisher, TransientPublisher>(); }
public void RegisterDefaults(IDependencyContainer container) { container.RegisterDefault <IFlowRepository>(() => new SqlConnectionFlowRepository(connectionString, serviceId, schema)); }