Click or drag to resize
IFileTypeManagerGetConverter Method (String, CultureInfo, Codepage, EventHandlerMessageEventArgs)
Creates and initializes a file converter for reading native files, without passing the output to anything.

Namespace: Sdl.FileTypeSupport.Framework.IntegrationApi
Assembly: Sdl.FileTypeSupport.Framework.Core (in Sdl.FileTypeSupport.Framework.Core.dll) Version: 1.0.0.0 (1.0.2551.0)
Syntax
IMultiFileConverter GetConverter(
	string[] nativeFilePaths,
	CultureInfo sourceLanguage,
	Codepage suggestedCodepage,
	EventHandler<MessageEventArgs> messageHandler
)

Parameters

nativeFilePaths
Type: SystemString
The native files to be converted
sourceLanguage
Type: System.GlobalizationCultureInfo
Expected source language of the files.

The same source (and target) language must be used for all the files processed with a single converter instance.

If the language can be determined automatically from the content of the file (e.g. when reading a bilingual format such as TTX), this parameter may be ignored by the parser. If this parameter is left undefined, it is up to the file sniffer and/or parser to try to determine the language. Parser components may report an error or a warning if they cannot reliably identify the language.

suggestedCodepage
Type: Sdl.Core.GlobalizationCodepage
A rough guess of what encoding the files use. This is normally set to the default codepage for the language, but can also be null. This serves only as a hint. A file sniffer can be used to determine the actual encoding for each file. An undefined codepage object can be used if no encoding can be guessed. It is then up to the file sniffer and/or parser to best determine the encoding and report an error if they fail or a warning if the result is not definite.
messageHandler
Type: SystemEventHandlerMessageEventArgs
An (optional) message handler implementation that will receive any messages reported from file sniffers invoked in the process. If a converter is returned, this message handler will also be connected to the Message event on the converter. You may specify null for this parameter.

Return Value

Type: IMultiFileConverter
A file converter object initialized to read the files, based on information from the best matching file type definitions.
Exceptions
ExceptionCondition
OneOrMoreFilesNotSupportedExceptionThrown if there are files for which no file type definition in the file type manager can be used.
See Also
Community
Edit

Be the first to Edit the community content of this topic.
Comments