public static ProjectionConfiguration Configuration(IConnectionConfigurationProvider provider) { Guard.AgainstNull(provider, nameof(provider)); var section = ConfigurationSectionProvider.Open <ProjectionSection>("shuttle", "projection"); var configuration = new ProjectionConfiguration(); var eventStoreConnectionStringName = "EventStore"; var eventProjectionConnectionStringName = "EventStore"; if (section != null) { eventStoreConnectionStringName = section.EventStoreConnectionStringName; eventProjectionConnectionStringName = section.EventProjectionConnectionStringName; } var connectionConfiguration = provider.Get(eventStoreConnectionStringName); configuration.EventStoreConnectionString = connectionConfiguration.ConnectionString; configuration.EventStoreProviderName = connectionConfiguration.ProviderName; connectionConfiguration = provider.Get(eventProjectionConnectionStringName); configuration.EventProjectionConnectionString = connectionConfiguration.ConnectionString; configuration.EventProjectionProviderName = connectionConfiguration.ProviderName; return(configuration); }
public ServiceClient(IConnectionConfigurationProvider connectionConfigurationProvider, IChatServiceFactory chatServiceFactory) { if (connectionConfigurationProvider == null) { throw new ArgumentNullException(nameof(connectionConfigurationProvider)); } if (chatServiceFactory == null) { throw new ArgumentNullException(nameof(chatServiceFactory)); } _connectionConfigurationProvider = connectionConfigurationProvider; _chatServiceFactory = chatServiceFactory; }
public DataStoreDatabaseContextFactory( IConnectionConfigurationProvider connectionConfigurationProvider, IDbConnectionFactory dbConnectionFactory, IDbCommandFactory dbCommandFactory, IDatabaseContextCache databaseContextCache, IDataStoreQuery dataStoreQuery) : base( connectionConfigurationProvider, dbConnectionFactory, dbCommandFactory, databaseContextCache) { Guard.AgainstNull(dataStoreQuery, nameof(dataStoreQuery)); _dataStoreQuery = dataStoreQuery; }