| 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.IntegrationApiAssembly: Sdl.FileTypeSupport.Framework.Core (in Sdl.FileTypeSupport.Framework.Core.dll) Version: 1.0.0.0 (1.0.2343.0)
SyntaxIMultiFileConverter GetConverter(
string[] nativeFilePaths,
CultureInfo sourceLanguage,
Codepage suggestedCodepage,
EventHandler<MessageEventArgs> messageHandler
)
Function GetConverter (
nativeFilePaths As String(),
sourceLanguage As CultureInfo,
suggestedCodepage As Codepage,
messageHandler As EventHandler(Of MessageEventArgs)
) As IMultiFileConverter
IMultiFileConverter^ GetConverter(
array<String^>^ nativeFilePaths,
CultureInfo^ sourceLanguage,
Codepage^ suggestedCodepage,
EventHandler<MessageEventArgs^>^ messageHandler
)
abstract GetConverter :
nativeFilePaths : string[] *
sourceLanguage : CultureInfo *
suggestedCodepage : Codepage *
messageHandler : EventHandler<MessageEventArgs> -> IMultiFileConverter
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: Codepage
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:
IMultiFileConverterA file converter object initialized to read the files, based on information from the best matching file type definitions.
Exceptions
See Also
Comments