Exemplo n.º 1
0
 public SchemaCommandGenerator(
     ISessionFactoryHolder sessionFactoryHolder,
     IDataServicesProviderFactory dataServicesProviderFactory)
 {
     _sessionFactoryHolder        = sessionFactoryHolder;
     _dataServicesProviderFactory = dataServicesProviderFactory;
 }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="shellSettings"></param>
        public SessionFactoryHolder(
            ShellSettings shellSettings)
        {
            _shellSettings = shellSettings;
            _dataServicesProviderFactory = new DataServicesProviderFactory(new[] {
                new Meta <CreateDataServicesProvider>(
                    (dataFolder, connectionString) => new SqlServerDataServicesProvider(dataFolder, connectionString),
                    new Dictionary <string, object> {
                    { "ProviderName", "SqlServer" }
                }),
                new Meta <CreateDataServicesProvider>(
                    (dataFolder, connectionString) => new SqlCeDataServicesProvider(dataFolder, connectionString),
                    new Dictionary <string, object> {
                    { "ProviderName", "SqlCe" }
                }),
                new Meta <CreateDataServicesProvider>(
                    (dataFolder, connectionString) => new MySqlDataServicesProvider(dataFolder, connectionString),
                    new Dictionary <string, object> {
                    { "ProviderName", "MySql" }
                })
            });
            _sessionConfigurationCache = new SessionConfigurationCache(_shellSettings);
            _cacheConfiguration        = new DefaultDatabaseCacheConfiguration();

            Logger = LoggerFactory.GetLog();
        }
 public SchemaCommandGenerator(
     ISessionFactoryHolder sessionFactoryHolder,
     IDataServicesProviderFactory dataServicesProviderFactory)
 {
     _sessionFactoryHolder = sessionFactoryHolder;
     _dataServicesProviderFactory = dataServicesProviderFactory;
 }
        public SessionFactoryHolderFactory(
            ShellSettings shellSettings,
            ShellBlueprint shellBlueprint,
            IDataServicesProviderFactory dataServicesProviderFactory,
            IAppDataFolder appDataFolder,
            ISessionConfigurationCache sessionConfigurationCache,
            IHostEnvironment hostEnvironment,
            IDatabaseCacheConfiguration cacheConfiguration,
            Func<IEnumerable<ISessionConfigurationEvents>> configurers,
            IRepository<ConnectionsRecord> connectionsRecordRepository,
            IEncryptionService encryptionService,
            ICacheManager cacheManager)
        {
            _shellSettings = shellSettings;
            _shellBlueprint = shellBlueprint;
            _dataServicesProviderFactory = dataServicesProviderFactory;
            _appDataFolder = appDataFolder;
            _sessionConfigurationCache = sessionConfigurationCache;
            _hostEnvironment = hostEnvironment;
            _cacheConfiguration = cacheConfiguration;
            _configurers = configurers;
            _connectionsRecordRepository = connectionsRecordRepository;
            _encryptionService = encryptionService;
            _cacheManager = cacheManager;

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
        public SessionFactoryHolderFactory(
            ShellSettings shellSettings,
            ShellBlueprint shellBlueprint,
            IDataServicesProviderFactory dataServicesProviderFactory,
            IAppDataFolder appDataFolder,
            ISessionConfigurationCache sessionConfigurationCache,
            IHostEnvironment hostEnvironment,
            IDatabaseCacheConfiguration cacheConfiguration,
            Func <IEnumerable <ISessionConfigurationEvents> > configurers,
            IRepository <ConnectionsRecord> connectionsRecordRepository,
            IEncryptionService encryptionService,
            ICacheManager cacheManager)
        {
            _shellSettings  = shellSettings;
            _shellBlueprint = shellBlueprint;
            _dataServicesProviderFactory = dataServicesProviderFactory;
            _appDataFolder             = appDataFolder;
            _sessionConfigurationCache = sessionConfigurationCache;
            _hostEnvironment           = hostEnvironment;
            _cacheConfiguration        = cacheConfiguration;
            _configurers = configurers;
            _connectionsRecordRepository = connectionsRecordRepository;
            _encryptionService           = encryptionService;
            _cacheManager = cacheManager;

            T      = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
Exemplo n.º 6
0
        public CustomSessionFactoryHolder(
            ShellSettings shellSettings,
            ShellBlueprint shellBlueprint,
            IDataServicesProviderFactory dataServicesProviderFactory,
            IAppDataFolder appDataFolder,
            ISessionConfigurationCache sessionConfigurationCache,
            IHostEnvironment hostEnvironment,
            IDatabaseCacheConfiguration cacheConfiguration,
            Func <IEnumerable <ISessionConfigurationEvents> > configurers,
            string provider,
            string connectionString
            )
        {
            _shellSettings  = shellSettings;
            _shellBlueprint = shellBlueprint;
            _dataServicesProviderFactory = dataServicesProviderFactory;
            _appDataFolder             = appDataFolder;
            _sessionConfigurationCache = sessionConfigurationCache;
            _hostEnvironment           = hostEnvironment;
            _cacheConfiguration        = cacheConfiguration;
            _configurers = configurers;

            _provider         = provider;
            _connectionString = connectionString;

            T      = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
Exemplo n.º 7
0
 /// <summary>
 ///
 /// </summary>
 public SessionFactoryHolder(int cacheRegion)
 {
     _sessionFactories            = new ConcurrentDictionary <Guid, ISessionFactory>();
     _configDictonary             = new ConcurrentDictionary <Guid, NHibernate.Cfg.Configuration>();
     _dataServicesProviderFactory = new DataServicesProviderFactory();
     Logger        = LoggerFactory.GetLog();
     _cacheManager = new FileCacheManager <NHibernate.Cfg.Configuration>(cacheRegion);
 }
 public DbContextFactoryHolder(
     ShellSettings shellSettings,
     IDataServicesProviderFactory dataServicesProviderFactory,
     IAppDataFolder appDataFolder)
 {
     _shellSettings = shellSettings;
     _dataServicesProviderFactory = dataServicesProviderFactory;
     _appDataFolder = appDataFolder;
 }
Exemplo n.º 9
0
 public DbContextFactoryHolder(
     ShellSettings shellSettings,
     IDataServicesProviderFactory dataServicesProviderFactory,
     IAppDataFolder appDataFolder)
 {
     _shellSettings = shellSettings;
     _dataServicesProviderFactory = dataServicesProviderFactory;
     _appDataFolder = appDataFolder;
 }
Exemplo n.º 10
0
 public SessionFactoryHolder(ShellSettings shellSetting, IEnumerable <RecordBlueprint> records,
                             ISessionConfigurationCache sessionConfigurationCache, IDataServicesProviderFactory dataServicesProviderFactory, IDatabaseCacheConfiguration cacheConfiguration)
 {
     _shellSettings               = shellSetting;
     _records                     = records;
     _sessionConfigurationCache   = sessionConfigurationCache;
     _dataServicesProviderFactory = dataServicesProviderFactory;
     _cacheConfiguration          = cacheConfiguration;
     Logger = NullLogger.Instance;
 }
Exemplo n.º 11
0
        public SessionFactoryHolder(
            ShellSettings shellSettings,
            IDataServicesProviderFactory dataServicesProviderFactory,
            ILogger logger)
        {
            _shellSettings = shellSettings;
            _dataServicesProviderFactory = dataServicesProviderFactory;

            Logger = logger;
        }
Exemplo n.º 12
0
        public SessionFactoryHolder(
            ShellSettings shellSettings,
            IDataServicesProviderFactory dataServicesProviderFactory,
            ILogger logger)
        {
            _shellSettings = shellSettings;
            _dataServicesProviderFactory = dataServicesProviderFactory;

            Logger = logger;
        }
Exemplo n.º 13
0
 public SessionFactoryHolder(ShellSettings shellSetting, IEnumerable<RecordBlueprint> records,
     ISessionConfigurationCache sessionConfigurationCache, IDataServicesProviderFactory dataServicesProviderFactory, IDatabaseCacheConfiguration cacheConfiguration)
 {
     _shellSettings = shellSetting;
     _records = records;
     _sessionConfigurationCache = sessionConfigurationCache;
     _dataServicesProviderFactory = dataServicesProviderFactory;
     _cacheConfiguration = cacheConfiguration;
     Logger = NullLogger.Instance;
 }
Exemplo n.º 14
0
 public SchemaCommandGenerator(
     ISessionFactoryHolder sessionFactoryHolder,
     IExtensionManager extensionManager,
     ICompositionStrategy compositionStrategy,
     ShellSettings shellSettings,
     IDataServicesProviderFactory dataServicesProviderFactory) {
     _sessionFactoryHolder = sessionFactoryHolder;
     _extensionManager = extensionManager;
     _compositionStrategy = compositionStrategy;
     _shellSettings = shellSettings;
     _dataServicesProviderFactory = dataServicesProviderFactory;
 }
 public SchemaCommandGenerator(
     ISessionFactoryHolder sessionFactoryHolder,
     IExtensionManager extensionManager,
     ICompositionStrategy compositionStrategy,
     IConfigurationService configService,
     IDataServicesProviderFactory dataServicesProviderFactory)
 {
     _sessionFactoryHolder        = sessionFactoryHolder;
     _extensionManager            = extensionManager;
     _compositionStrategy         = compositionStrategy;
     _connection                  = configService.ConnectionSettings;
     _dataServicesProviderFactory = dataServicesProviderFactory;
 }
Exemplo n.º 16
0
 public SchemaCommandGenerator(
     ISessionFactoryHolder sessionFactoryHolder,
     IExtensionManager extensionManager,
     ICompositionStrategy compositionStrategy,
     ShellSettings shellSettings,
     IDataServicesProviderFactory dataServicesProviderFactory)
 {
     _sessionFactoryHolder        = sessionFactoryHolder;
     _extensionManager            = extensionManager;
     _compositionStrategy         = compositionStrategy;
     _shellSettings               = shellSettings;
     _dataServicesProviderFactory = dataServicesProviderFactory;
 }
Exemplo n.º 17
0
        public SessionFactoryHolder(
			ShellSettings shellSettings,
			ShellBlueprint shellBlueprint,
			IDataServicesProviderFactory dataServicesProviderFactory,
			IAppDataFolder appDataFolder,
			ISessionConfigurationCache sessionConfigurationCache)
        {
            _shellSettings = shellSettings;
            _shellBlueprint = shellBlueprint;
            _dataServicesProviderFactory = dataServicesProviderFactory;
            _appDataFolder = appDataFolder;
            _sessionConfigurationCache = sessionConfigurationCache;

            Logger = NullLogger.Instance;
        }
Exemplo n.º 18
0
        public SessionFactoryHolder(
            ShellSettings shellSettings,
            ShellBlueprint shellBlueprint,
            IDataServicesProviderFactory dataServicesProviderFactory,
            IAppDataFolder appDataFolder,
            ISessionConfigurationCache sessionConfigurationCache)
        {
            _shellSettings  = shellSettings;
            _shellBlueprint = shellBlueprint;
            _dataServicesProviderFactory = dataServicesProviderFactory;
            _appDataFolder             = appDataFolder;
            _sessionConfigurationCache = sessionConfigurationCache;

            Logger = NullLogger.Instance;
        }
Exemplo n.º 19
0
 public SessionFactoryHolder(IHostEnvironment hostEnvironment, ISessionConfigurationCache sessionConfigurationCache,
                             IDatabaseCacheConfiguration cacheConfiguration,
                             ShellBlueprint shellBluePrint,
                             Func <IEnumerable <ISessionConfigurationEvents> > configurers,
                             ShellSettings shellSettings,
                             IAppDataFolder appDataFolder,
                             IDataServicesProviderFactory dataServicesProviderFactory)
 {
     Logger                       = NullLogger.Instance;
     _hostEnvironment             = hostEnvironment;
     _sessionConfigurationCache   = sessionConfigurationCache;
     _cacheConfiguration          = cacheConfiguration;
     _configurers                 = configurers;
     _dataServicesProviderFactory = dataServicesProviderFactory;
     _shellSettings               = shellSettings;
     _shellBlueprint              = shellBluePrint;
     _appDataFolder               = appDataFolder;
 }
Exemplo n.º 20
0
        public SessionFactoryHolder(
            ShellSettings shellSettings,
            ShellBlueprint shellBlueprint,
            IDataServicesProviderFactory dataServicesProviderFactory,
            IAppDataFolder appDataFolder,
            ISessionConfigurationCache sessionConfigurationCache,
            IHostEnvironment hostEnvironment,
            IDatabaseCacheConfiguration cacheConfiguration) {
            _shellSettings = shellSettings;
            _shellBlueprint = shellBlueprint;
            _dataServicesProviderFactory = dataServicesProviderFactory;
            _appDataFolder = appDataFolder;
            _sessionConfigurationCache = sessionConfigurationCache;
            _hostEnvironment = hostEnvironment;
            _cacheConfiguration = cacheConfiguration;

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
        public SessionFactoryHolder(
            ShellSettings shellSettings,
            ShellBlueprint shellBlueprint,
            IDataServicesProviderFactory dataServicesProviderFactory,
            IAppDataFolder appDataFolder,
            ISessionConfigurationCache sessionConfigurationCache,
            IHostEnvironment hostEnvironment,
            IDatabaseCacheConfiguration cacheConfiguration)
        {
            _shellSettings  = shellSettings;
            _shellBlueprint = shellBlueprint;
            _dataServicesProviderFactory = dataServicesProviderFactory;
            _appDataFolder             = appDataFolder;
            _sessionConfigurationCache = sessionConfigurationCache;
            _hostEnvironment           = hostEnvironment;
            _cacheConfiguration        = cacheConfiguration;

            T      = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
 public SessionFactoryHolder(
     IConfigurationService configService,
     [Import(RequiredCreationPolicy = CreationPolicy.Shared)]
     IShellBlueprintFactory shellBlueprintFactory,
     IDataServicesProviderFactory dataServicesProviderFactory,
     IUserFolder userFolder,
     [Import(RequiredCreationPolicy = CreationPolicy.Shared)]
     ISessionConfigurationCache sessionConfigurationCache)
 {
     ConfigService    = configService;
     ShellBlueprint   = shellBlueprintFactory.CreateBlueprint();
     BluePrintFactory = () =>
     {
         shellBlueprintFactory.Reset();
         return(shellBlueprintFactory.CreateBlueprint());
     };
     _dataServicesProviderFactory = dataServicesProviderFactory;
     _userFolder = userFolder;
     _sessionConfigurationCache = sessionConfigurationCache;
     Logger = NullLogger.Instance;
 }
        public CustomSessionFactoryHolder(
            ShellSettings shellSettings,
            ShellBlueprint shellBlueprint,
            IDataServicesProviderFactory dataServicesProviderFactory,
            IAppDataFolder appDataFolder,
            ISessionConfigurationCache sessionConfigurationCache,
            IHostEnvironment hostEnvironment,
            IDatabaseCacheConfiguration cacheConfiguration,
            Func<IEnumerable<ISessionConfigurationEvents>> configurers,
            string provider,
            string connectionString
            )
        {
            _shellSettings = shellSettings;
            _shellBlueprint = shellBlueprint;
            _dataServicesProviderFactory = dataServicesProviderFactory;
            _appDataFolder = appDataFolder;
            _sessionConfigurationCache = sessionConfigurationCache;
            _hostEnvironment = hostEnvironment;
            _cacheConfiguration = cacheConfiguration;
            _configurers = configurers;

            _provider = provider;
            _connectionString = connectionString;

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }