Class TMXReader
Represents an event reader for TMX files.
Inheritance
Inherited Members
Namespace: Sdl.LanguagePlatform.IO.TMX
Assembly: Sdl.LanguagePlatform.IO.dll
Syntax
public class TMXReader : IEventReader, IDisposable
Constructors
TMXReader(TextReader)
Initializes a new instance of the TMXReader class with the specified text reader and default settings.
Declaration
public TMXReader(TextReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | reader | The text reader. |
TMXReader(TextReader, TMXReaderSettings)
Initializes a new instance of the TMXReader class with the specified text reader and import context.
Declaration
public TMXReader(TextReader reader, TMXReaderSettings readerSettings)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | reader | The text reader. |
TMXReaderSettings | readerSettings | The settings to use for the reader. |
TMXReader(String)
Initializes a new instance of the TMXReader class with the specified file name and default settings.
Declaration
public TMXReader(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The file name. |
TMXReader(String, TMXReaderSettings)
Initializes a new instance of the TMXReader class with the specified file name and import context.
Declaration
public TMXReader(string fileName, TMXReaderSettings readerSettings)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The file name. |
TMXReaderSettings | readerSettings | The settings to use for the reader. |
Properties
EncounteredLanguages
Returns a dictionary which counts the number of times a segment was encountered in a specific culture, independent of whether this was as a source or target segment.
Declaration
public Dictionary<CultureInfo, int> EncounteredLanguages { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Globalization.CultureInfo, System.Int32> |
Flavor
Gets the TMX flavor of the underlying TMX file.
Declaration
public TranslationUnitFormat Flavor { get; }
Property Value
Type | Description |
---|---|
TranslationUnitFormat |
RawTUsRead
Declaration
public int RawTUsRead { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Settings
Gets the current reader settings.
Declaration
public TMXReaderSettings Settings { get; }
Property Value
Type | Description |
---|---|
TMXReaderSettings |
Methods
Dispose()
Declaration
public void Dispose()
Read()
Reads the next item in the import file and returns the corresponding Event object, from that particular item.
Declaration
public Event Read()
Returns
Type | Description |
---|---|
Event | An Event object. |