public IssuerSharesServiceHostFactory() { this.settings = CreateFacadeSettings( ConfigurationSettings.AimsConnectionString, ConfigurationSettings.ShouldDropRepositoriesOnEachReload ); }
private static GreenField.IssuerShares.Server.FacadeSettings CreateFacadeSettingsUnsafe(string connectionString, bool shouldDropRepositories) { //var connectionString = ConfigurationManager.ConnectionStrings["Aims"].ConnectionString; var connectionFactory = new SqlConnectionFactory(connectionString); var dataManagerFactory = new GreenField.IssuerShares.Core.DataManagerFactory(); var cache = MemoryCache.Default; var monitor = new Monitor(); var countryRepositoryStorage = new CacheStorage <CountryRepository>(cache); var countryManager = new CountryManager(countryRepositoryStorage); var securityStorage = new CacheStorage <SecurityRepository>(cache); var securityManager = new SecurityManager(securityStorage, monitor); var issuerRepositoryStorage = new CacheStorage <IssuerRepository>(cache); var issuerManager = new IssuerManager(monitor, issuerRepositoryStorage); var repositoryManager = new RepositoryManager(monitor, countryManager, securityManager, null, issuerManager); var modelBuilder = new GreenField.IssuerShares.Core.ModelBuilder(); var manager = new GreenField.IssuerShares.Core.ModelManager(connectionFactory, dataManagerFactory, repositoryManager, modelBuilder); var commonSerializer = new Aims.Data.Server.Serializer(); var serializer = new GreenField.IssuerShares.Server.Serializer(commonSerializer); var deserializer = new GreenField.IssuerShares.Server.Deserializer(connectionFactory, dataManagerFactory, repositoryManager); //var facade = new GreenField.IssuerShares.Server.Facade(manager, commonSerializer, serializer, deserializer, connectionFactory, dataManagerFactory, repositoryManager); var result = new GreenField.IssuerShares.Server.FacadeSettings(manager, commonSerializer, serializer, deserializer, connectionFactory, dataManagerFactory, repositoryManager); return(result); }
public Facade(FacadeSettings settings) : this(settings.ModelManager, settings.CommonSerializer, settings.Serializer, settings.Deserializer, settings.ConnectionFactory, settings.DataManagerFactory, settings.RepositoryManager) { }