public ContentExporter(List <SegmentPairInfo> selectedSegments, SegmentBuilder segmentBuilder) { _selectedSegments = selectedSegments; _segmentBuilder = segmentBuilder; _projectFilesFiltered = new List <string>(); SegmentPairInfos = new List <SegmentPairInfo>(); }
public SdlxliffImporter(ProjectFileService projectFileService, FilterItemService filterItemService, ParagraphUnitProvider paragraphUnitProvider, SegmentBuilder segmentBuilder) { _projectFileService = projectFileService; _filterItemService = filterItemService; _paragraphUnitProvider = paragraphUnitProvider; _segmentBuilder = segmentBuilder; }
public ContentImporter(List <SegmentPairInfo> updatedSegmentPairs, List <string> excludeFilterIds, FilterItemService filterItemService, ParagraphUnitProvider paragraphUnitProvider, SegmentBuilder segmentBuilder) { _updatedSegmentPairs = updatedSegmentPairs; _excludeFilterIds = excludeFilterIds; _filterItemService = filterItemService; _paragraphUnitProvider = paragraphUnitProvider; _segmentBuilder = segmentBuilder; UpdatedSegments = 0; ExcludedSegments = 0; TotalSegments = 0; }
public OutputFile ExportFile(List <SegmentPairInfo> selectedSegments, string filePathInput, string filePathOutput) { var fileTypeManager = DefaultFileTypeManager.CreateInstance(true); var converter = fileTypeManager.GetConverterToDefaultBilingual(filePathInput, filePathOutput, null); var segmentBuilder = new SegmentBuilder(); var contentWriter = new ContentExporter(selectedSegments, segmentBuilder); converter.AddBilingualProcessor(contentWriter); converter.SynchronizeDocumentProperties(); converter.Parse(); var outputFile = new OutputFile { FilePath = filePathOutput, SegmentCount = contentWriter.SegmentPairInfos.Count, WordCount = contentWriter.SegmentPairInfos.Sum(a => a.SourceWordCounts.Words) }; return(outputFile); }
public SdlxliffExporter(SegmentBuilder segmentBuilder) { _segmentBuilder = segmentBuilder; }