public ImportResult[] AddTranslationUnitsMasked(TranslationUnit[] translationUnits, ImportSettings settings, bool[] mask) { var results = _fileBasedTranslationProviderLanguageDirection.AddTranslationUnitsMasked(translationUnits, settings, mask); var tmPath = this.TranslationProvider.Uri.AbsolutePath; var tmDataAccess = TmDataAccess.OpenConnection(tmPath); for (int i = 0; i < results.Length; i++) { var result = results[i]; if (result == null) { continue; } var translationUnit = translationUnits[i]; if (result.Action == Action.Add || result.Action == Action.Merge || result.Action == Action.Overwrite) { tmDataAccess.AddOrUpdateSourceFile(result.TuId.Id, translationUnit.DocumentProperties.LastOpenedAsPath); } } return(results); }
public ImportResult[] AddTranslationUnitsMasked(TranslationUnit[] translationUnits, ImportSettings settings, bool[] mask) { var results = _fileBasedTranslationProviderLanguageDirection.AddTranslationUnitsMasked(translationUnits, settings, mask); var tmDataAccess = TmDataAccess.OpenConnection(TranslationProvider.Uri); for (int i = 0; i < results.Length; i++) { var result = results[i]; if (result == null) { continue; } var translationUnit = translationUnits[i]; if (result.Action == Action.Add || result.Action == Action.Merge || result.Action == Action.Overwrite) { var customFieldsValue = new CustomFieldValues { FileNameFullPath = translationUnit.GetFilePath(), ProjectName = translationUnit.GetProjectName() }; tmDataAccess.AddOrUpdateCustomFields(result.TuId.Id, customFieldsValue); } } return(results); }
public ImportResult[] AddTranslationUnitsMasked(TranslationUnit[] translationUnits, ImportSettings settings, bool[] mask) { var results = _fileBasedTranslationProviderLanguageDirection.AddTranslationUnitsMasked( translationUnits, settings, mask); ProcessTranslationUnits(translationUnits, results); return(results); }