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
[Obsolete("Use version providing ICultureMetadataManager")]
public TMXReader(TextReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.IO.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 |
---|---|---|
System.IO.TextReader | reader | The text reader. |
Sdl.Core.Globalization.CultureMetadataManager.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 |
---|---|---|
System.IO.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 |
---|---|---|
System.IO.TextReader | reader | The text reader. |
TMXReaderSettings | readerSettings | The settings to use for the reader. |
Sdl.Core.Globalization.CultureMetadataManager.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 |
---|---|---|
System.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 |
---|---|---|
System.String | fileName | The file name. |
Sdl.Core.Globalization.CultureMetadataManager.ICultureMetadataManager | cultureMetadataManager |
TMXReader(String, TMXReaderSettings)
Declaration
[Obsolete("Use version providing ICultureMetadataManager")]
public TMXReader(string fileName, TMXReaderSettings readerSettings)
Parameters
Type | Name | Description |
---|---|---|
System.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 |
---|---|---|
System.String | fileName | The file name. |
TMXReaderSettings | readerSettings | The settings to use for the reader. |
Sdl.Core.Globalization.CultureMetadataManager.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 |
---|---|
System.Collections.Generic.Dictionary<Sdl.Core.Globalization.CultureCode, 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()
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 |
---|---|
System.Threading.Tasks.Task<Event> | An Event object. |