Interface IBilingualContentHandler
This interface is implemented by content processors that work on the bilingual content model, for example IBilingualContentProcessor and IBilingualWriter.
Namespace: Sdl.FileTypeSupport.Framework.BilingualApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface IBilingualContentHandler
Remarks
To facilitate processing in a streaming manner without requiring the entire document object in memory at any time the implementation will be fed ParagraphUnits one by one through calls to ProcessParagraphUnit(IParagraphUnit).
Document and file properties are provided from the framework by calling IDocumentProperties and IFileProperties before processing content in the document / file.
If the component implements the System.IDisposable interface, the Dispose() method will be called by the framework for clean-up after parsing is finished.
Methods
Complete()
Called by the framework when all content has been processed.
At this point it is safe to assume that the document properties will not change any further.
Declaration
void Complete()
FileComplete()
Called by the framework after all trans units in a file have been processed by all components.
At this point it is safe to assume that the file properties will not change any further.
Declaration
void FileComplete()
Initialize(IDocumentProperties)
The framework will call this method to provide the implementation with a reference to the document properties for the document being processed.
This method will always be called, and always before any other calls are made on this interface.
This or other content processor implementations may modify the document properties as part of the document processing. If you need to access the final version of the document properties, you should do so through the Complete() method implementation.
Declaration
void Initialize(IDocumentProperties documentInfo)
Parameters
Type | Name | Description |
---|---|---|
IDocumentProperties | documentInfo |
ProcessParagraphUnit(IParagraphUnit)
The framework will call this method for each ParagraphUnit in the file.
Declaration
void ProcessParagraphUnit(IParagraphUnit paragraphUnit)
Parameters
Type | Name | Description |
---|---|---|
IParagraphUnit | paragraphUnit |
SetFileProperties(IFileProperties)
The framework will call this method to provide the implementation with a reference to the properties for each file in the document before the ParagraphUnits of the file are processed.
This or other content processor implementations may modify the properties as part of the file processing. If you need to access the final version of the file properties, you should do so through the FileComplete() method implementation.
Declaration
void SetFileProperties(IFileProperties fileInfo)
Parameters
Type | Name | Description |
---|---|---|
IFileProperties | fileInfo |