Class TMXReader
Represents an event reader for TMX files.
Inherited Members
Namespace: SdlSdl.LanguagePlatformIOTMX
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
[Obsolete("Use version providing ICultureMetadataManager")]
public TMXReader(TextReader reader)
Parameters
Type | Name | Description |
---|---|---|
TextReader | reader | The text reader. |
TMXReader(TextReader, ICultureMetadataManager)
Initializes a new instance of the TMXReader class with the specified text reader and default settings.
Declaration
public TMXReader(TextReader reader, ICultureMetadataManager cultureMetadataManager)
Parameters
Type | Name | Description |
---|---|---|
TextReader | reader | The text reader. |
ICultureMetadataManager | cultureMetadataManager |
TMXReader(TextReader, TMXReaderSettings)
Initializes a new instance of the TMXReader class with the specified text reader and import context.
Declaration
[Obsolete("Use version providing ICultureMetadataManager")]
public TMXReader(TextReader reader, TMXReaderSettings readerSettings)
Parameters
Type | Name | Description |
---|---|---|
TextReader | reader | The text reader. |
TMXReaderSettings | readerSettings | The settings to use for the reader. |
TMXReader(TextReader, TMXReaderSettings, ICultureMetadataManager)
Initializes a new instance of the TMXReader class with the specified text reader and import context.
Declaration
public TMXReader(TextReader reader, TMXReaderSettings readerSettings, ICultureMetadataManager cultureMetadataManager)
Parameters
Type | Name | Description |
---|---|---|
TextReader | reader | The text reader. |
TMXReaderSettings | readerSettings | The settings to use for the reader. |
ICultureMetadataManager | cultureMetadataManager |
TMXReader(string)
Initializes a new instance of the TMXReader class with the specified file name and default settings.
Declaration
[Obsolete("Use version providing ICultureMetadataManager")]
public TMXReader(string fileName)
Parameters
Type | Name | Description |
---|---|---|
string | fileName | The file name. |
TMXReader(string, ICultureMetadataManager)
Initializes a new instance of the TMXReader class with the specified file name and default settings.
Declaration
public TMXReader(string fileName, ICultureMetadataManager cultureMetadataManager)
Parameters
Type | Name | Description |
---|---|---|
string | fileName | The file name. |
ICultureMetadataManager | cultureMetadataManager |
TMXReader(string, TMXReaderSettings)
Declaration
[Obsolete("Use version providing ICultureMetadataManager")]
public TMXReader(string fileName, TMXReaderSettings readerSettings)
Parameters
Type | Name | Description |
---|---|---|
string | fileName | |
TMXReaderSettings | readerSettings |
TMXReader(string, TMXReaderSettings, ICultureMetadataManager)
Initializes a new instance of the TMXReader class with the specified file name and import context.
Declaration
public TMXReader(string fileName, TMXReaderSettings readerSettings, ICultureMetadataManager cultureMetadataManager)
Parameters
Type | Name | Description |
---|---|---|
string | fileName | The file name. |
TMXReaderSettings | readerSettings | The settings to use for the reader. |
ICultureMetadataManager | cultureMetadataManager |
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<CultureCode, int> EncounteredLanguages { get; }
Property Value
Type | Description |
---|---|
DictionaryCultureCodeint |
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 |
---|---|
int |
Settings
Gets the current reader settings.
Declaration
public TMXReaderSettings Settings { get; }
Property Value
Type | Description |
---|---|
TMXReaderSettings |
Methods
Dispose()
Declaration
public void Dispose()
Read()
Declaration
public Event Read()
Returns
Type | Description |
---|---|
Event |
ReadAsync()
Reads the next item in the import file and returns the corresponding Event object, from that particular item.
Declaration
public Task<Event> ReadAsync()
Returns
Type | Description |
---|---|
TaskEvent | An Event object. |