public override void CancelExecuting(params object[] parameters) { var importParametersRepository = new ImportParametersRepository(UserConnection); importParametersRepository.CancelImportSession(ImportSessionId); base.CancelExecuting(parameters); }
protected override bool InternalExecute(ProcessExecutingContext context) { var importParametersRepository = new ImportParametersRepository(UserConnection); importParametersRepository.UpdateImportProcessId(ImportSessionId, Guid.Parse(OwnerUId)); var persistentFileImporter = new PersistentFileImporter(UserConnection); var tags = CreateTags(); persistentFileImporter.SaveImportTags(ImportSessionId, tags); try { persistentFileImporter.Import(ImportSessionId); } catch (OperationCanceledException) { return(false); } return(true); }