コード例 #1
0
ファイル: PackageService.cs プロジェクト: dealproc/Drey
 /// <summary>
 /// Initializes a new instance of the <see cref="PackageService"/> class.
 /// </summary>
 /// <param name="packageRepository">The package repository.</param>
 /// <param name="connectionStringRepository">The connection string repository.</param>
 /// <param name="packageSettingRepository">The package setting repository.</param>
 public PackageService(IPackageRepository packageRepository, IConnectionStringRepository connectionStringRepository, IPackageSettingRepository packageSettingRepository, ServiceModel.IHoardeManager hoardeManager)
 {
     _packageRepository = packageRepository;
     _connectionStringRepository = connectionStringRepository;
     _packageSettingRepository = packageSettingRepository;
     _hoardManager = hoardeManager;
 }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DbConfigurationSettings" /> class.
        /// </summary>
        /// <param name="hostApplicationConfiguration">The host application configuration.</param>
        /// <param name="packageSettingRepository">The package setting repository.</param>
        /// <param name="connectionStringsRepository">The connection strings repository.</param>
        /// <param name="packageId">The package identifier.</param>
        public DbConfigurationSettings(INutConfiguration hostApplicationConfiguration,
            IPackageSettingRepository packageSettingRepository,
            IConnectionStringRepository connectionStringsRepository,
            string packageId)
        {
            _hostApplicationConfiguration = hostApplicationConfiguration;
            _packageId = packageId;

            _globalSettingsRepository = new Repositories.SQLiteRepositories.GlobalSettingsRepository(this);
            _applicationSettingsService = new Sponsor<IApplicationSettings>(new Services.ApplicationSettingsService(_packageId, packageSettingRepository));
            _connectionStringsService = new Sponsor<IConnectionStrings>(new Services.ConnectionStringsService(_packageId, connectionStringsRepository));

            _log.Debug("Created db configuration settings provider");
        }