コード例 #1
0
 /// <summary>
 /// initialise une nouvelle instance la classe
 /// </summary>
 public DatabaseService(IMigrationService migrationService)
 {
     _databasePath = DependencyService.Get <IPlatFormService>().GetLocalFilePath("database.db");
     using (var connection = Connnection())
     {
         migrationService.Migrate(connection);
     }
 }
コード例 #2
0
 public void Run()
 {
     _migrationLocator.Locate();
     _runtimeVersionLocator.Locate();
     _collectionLocator.Locate();
     _startUpVersionLocator.Locate();
     _migrationService.Migrate();
 }
コード例 #3
0
 public static void MigrateTo(IMigrationService migrationService, string connectionString, 
     string migrationDefinitionResourceName, int? targetVersion)
 {
     WithResource(migrationDefinitionResourceName,
         delegate(Stream stream)
         {
             migrationService.Migrate(connectionString, targetVersion, new StreamReader(stream, Encoding.UTF8));
         });
 }
コード例 #4
0
        public void Run()
        {
            _documentMigrationLocator.Locate();
            _databaseMigrationLocator.Locate();
            _runtimeVersionLocator.Locate();
            _collectionLocator.Locate();
            _startUpVersionLocator.Locate();

            _migrationService.Migrate();
        }
コード例 #5
0
        public ActionResult MigrateRepo(GitMigrationRequest request)
        {
            var result = new WebResult();

            try
            {
                var migrationResult = _migrationService.Migrate(request, NotifyUpdates);
                result.Error   = !migrationResult.Success;
                result.Message = string.Join(Environment.NewLine, migrationResult.ErrorMessages.ToArray());
            }
            catch (SvnMigrationException ex)
            {
                result.Error   = true;
                result.Message = ex.Message;
            }

            return(Json(result));
        }
コード例 #6
0
 public async Task <IActionResult> Migrate()
 {
     _migrationService.Migrate();
     return(Ok("success"));
 }