Click or drag to resize
IFileTypeManagerGetConverterToBilingual Method (String, IBilingualDocumentGenerator, BilingualDocumentOutputPropertiesProvider, EventHandlerMessageEventArgs)
Creates and initializes a file converter for a single file, typically of the default bilingual file type. The specified bilingual document generator will be used for output. The file type definitions are tested in order, and the first file type definition that matches the input file is used. The following steps are used to determine if a file type definition matches the file:
  1. The regular expression is evaluated against the name of the file to be converted. If it does not match, the file type definition is not used.
  2. If a file sniffer is defined for the file type definition, it gets applied to the file. If the file sniffer does not indicate that the file is supported, the file type definition is not used.
If no matching file type definition is found, a OneOrMoreFilesNotSupportedException is thrown.

Namespace: Sdl.FileTypeSupport.Framework.IntegrationApi
Assembly: Sdl.FileTypeSupport.Framework.Core (in Sdl.FileTypeSupport.Framework.Core.dll) Version: 1.0.0.0 (1.0.2343.0)
Syntax
IMultiFileConverter GetConverterToBilingual(
	string bilingualInputFilePath,
	IBilingualDocumentGenerator writer,
	BilingualDocumentOutputPropertiesProvider outputSettingsProvider,
	EventHandler<MessageEventArgs> messageHandler
)

Parameters

bilingualInputFilePath
Type: SystemString
The file to be converted. The language and code page of this file is expected to be automatically detected by the file sniffer, no external hints should be necessary.
writer
Type: Sdl.FileTypeSupport.Framework.IntegrationApiIBilingualDocumentGenerator
Bilingual writer to use as output with the converter
outputSettingsProvider
Type: Sdl.FileTypeSupport.Framework.IntegrationApiBilingualDocumentOutputPropertiesProvider
Implementation of the output settings provider for bilingual document files. Will be passed to the multi-file converter and used for writing bilingual document files. If the bilingual document generator does not have a bilingual document file writer, you can pass null for this parameter.
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 file, based on information from the best matching file type definition. To use the file converter, add your own bilingual processors to the converter, and call Parse or ParseNext to process the file.
Exceptions
ExceptionCondition
OneOrMoreFilesNotSupportedExceptionThrown if 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