Search Results for

    Show / Hide Table of Contents

    Class Importer

    Inheritance
    System.Object
    Importer
    TranslationMemoryImporter
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.Core.TM.ImportExport
    Assembly: Sdl.Core.TM.ImportExport.dll
    Syntax
    public class Importer

    Constructors

    Importer()

    Initializes a new instance of the Importer class.

    Declaration
    public Importer()

    Importer(IImportDestination)

    Declaration
    public Importer(IImportDestination importDestination)
    Parameters
    Type Name Description
    IImportDestination importDestination

    Fields

    BadTuCount

    Declaration
    protected int BadTuCount
    Field Value
    Type Description
    System.Int32

    Buffer

    Declaration
    protected readonly List<TranslationUnit> Buffer
    Field Value
    Type Description
    System.Collections.Generic.List<TranslationUnit>

    DefaultTranslationUnitChunkSize

    Defines the default size for a chunk of translation units to be processed in one round-trip through the import/export process. The default chunk size is 25.

    Declaration
    public const int DefaultTranslationUnitChunkSize = 200
    Field Value
    Type Description
    System.Int32

    ErrorOutput

    Declaration
    protected TMXWriter ErrorOutput
    Field Value
    Type Description
    TMXWriter

    MaxTranslationUnitChunkSize

    Defines the maximum allowed chunk size. The maximum allowed chunk size is 200.

    Declaration
    public const int MaxTranslationUnitChunkSize = 200
    Field Value
    Type Description
    System.Int32

    Properties

    CanChangeImportFile

    Flag set to true if the imported file can/should be changed

    Declaration
    public bool CanChangeImportFile { get; set; }
    Property Value
    Type Description
    System.Boolean

    ChunkSize

    Gets or sets the size of the translation unit chunk size

    Declaration
    public int ChunkSize { get; set; }
    Property Value
    Type Description
    System.Int32

    The size of the chunk.

    Exclusive

    If true, indicates this Importer is the only flow making changes to the destination TM, in which case optimisations are used. Do not set true if other flows/users may be updating the TM during the import.

    Declaration
    public bool Exclusive { get; set; }
    Property Value
    Type Description
    System.Boolean

    FileTypeManager

    Gets or sets the file type manager. This is only needed when imported bilingual documents; it is not required when imported TMX files.

    Declaration
    public IFileTypeManager FileTypeManager { get; set; }
    Property Value
    Type Description
    IFileTypeManager

    The file type manager.

    ImportSettings

    Gets or sets the import settings.

    Declaration
    public ImportSettings ImportSettings { get; set; }
    Property Value
    Type Description
    ImportSettings

    InvalidTranslationUnitsExportPath

    Gets or sets the invalid translation units export path.

    Declaration
    public string InvalidTranslationUnitsExportPath { get; set; }
    Property Value
    Type Description
    System.String

    The invalid translation units export path.

    Statistics

    Gets the statistics.

    Declaration
    public ImportStatistics Statistics { get; set; }
    Property Value
    Type Description
    ImportStatistics

    The statistics.

    TranslationMemoryUserIdSetting

    Gets or sets the user id used to import TUs.

    Declaration
    public string TranslationMemoryUserIdSetting { get; set; }
    Property Value
    Type Description
    System.String

    Methods

    Flush(ImportStatistics)

    Flushes the content of the internal translation unit buffer into the translation memory immediately.

    Declaration
    protected ImportExportResponse Flush(ImportStatistics stats)
    Parameters
    Type Name Description
    ImportStatistics stats

    The import results.

    Returns
    Type Description
    ImportExportResponse

    Response.Cancel if there is an event listener that has signaled it wants to stop the import, otherwise Response.Continue.

    Remarks

    Stats is an input/output parameter and it will be updated after the execution of this method accordingly.

    GetDefaultFileTypeManager()

    Returns the default file type manager.

    Declaration
    public IFileTypeManager GetDefaultFileTypeManager()
    Returns
    Type Description
    IFileTypeManager

    Import(String)

    Declaration
    public bool Import(string fileName)
    Parameters
    Type Name Description
    System.String fileName
    Returns
    Type Description
    System.Boolean

    Import(String, IImportDestination)

    Starts the import from the specified file.

    Declaration
    public bool Import(string fileName, IImportDestination importDestination)
    Parameters
    Type Name Description
    System.String fileName

    The file name.

    IImportDestination importDestination
    Returns
    Type Description
    System.Boolean

    The import results.

    OnBatchImported(ImportResults, ImportStatistics)

    Declaration
    protected ImportExportResponse OnBatchImported(ImportResults batchResults, ImportStatistics overallResults)
    Parameters
    Type Name Description
    ImportResults batchResults
    ImportStatistics overallResults
    Returns
    Type Description
    ImportExportResponse

    OutputErrorTu(TranslationUnit, ImportResult)

    Declaration
    protected void OutputErrorTu(TranslationUnit tu, ImportResult result)
    Parameters
    Type Name Description
    TranslationUnit tu
    ImportResult result

    Events

    BatchImported

    Occurs after a TU batch is imported

    Declaration
    public event EventHandler<BatchImportedEventArgs> BatchImported
    Event Type
    Type Description
    System.EventHandler<BatchImportedEventArgs>

    On this page

    Back to top Generated by DocFX