コード例 #1
0
ファイル: MigrationContext.cs プロジェクト: Carael/uMigrate
        public MigrationContext(
            [NotNull] IServiceContext services,
            [NotNull] UmbracoDatabase database,
            [NotNull] CacheHelper cacheHelper,
            [NotNull] IMigrationRecordRepository migrationRecords,
            [NotNull] MigrationConfiguration configuration,
            [CanBeNull] IMigrationLogger logger = null
            )
        {
            Services         = Argument.NotNull(nameof(services), services);
            Database         = Argument.NotNull(nameof(database), database);
            MigrationRecords = Argument.NotNull(nameof(migrationRecords), migrationRecords);
            Configuration    = Argument.NotNull(nameof(configuration), configuration);
            Logger           = logger;

            _cacheHelper = cacheHelper;
        }
コード例 #2
0
 public MigrationTreeController(IMigrationRecordRepository repository)
 {
     _repository = repository;
 }
コード例 #3
0
 public MigrationTreeController()
 {
     // can we use DI here?
     _repository = new DatabaseMigrationRecordRepository(DatabaseContext.Database);
 }