Interface IAbstractNativeContentHandler
This is the core streaming interface that is used for input and output of content to/from native content processor components such as file parsers and file writers for native file formats. It is specialized into INativeExtractionContentHandler and INativeGenerationContentHandler for any specifics to consider during read and write operations.
Namespace: SdlSdl.FileTypeSupportFrameworkNativeApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface IAbstractNativeContentHandler
Methods
ChangeContext(IContextProperties)
Sets or changes translation related context information. Context changes will most often be associated with structure tags. Context changes inside text will cause the text to be split into separate units during translation, which should normally be avoided (if possible).
Declaration
void ChangeContext(IContextProperties newContexts)
Parameters
Type | Name | Description |
---|---|---|
IContextProperties | newContexts |
CommentEnd()
Used to indicate the end of commented content in the stream.
Declaration
void CommentEnd()
CommentStart(ICommentProperties)
Used to indicate that the following content should be treated
as commented content until a matched CommentEnd()
call is made.
Declaration
void CommentStart(ICommentProperties commentInfo)
Parameters
Type | Name | Description |
---|---|---|
ICommentProperties | commentInfo | The comment information. |
CustomInfo(ICustomInfoProperties)
Temporary custom information, which can be used for communication between native content processing components.
Declaration
void CustomInfo(ICustomInfoProperties info)
Parameters
Type | Name | Description |
---|---|---|
ICustomInfoProperties | info |
Remarks
CustomInfo events are volatile, i.e. they are not persisted or converted into bilingual content. They are intended only for temporary communication between file type components. An example of a custom info event is the current cursor position when generating a preview for a file in the editor.
InlineEndTag(IEndTagProperties)
Content that is interpreted as the end of a previously emitted start tag.
Declaration
void InlineEndTag(IEndTagProperties tagInfo)
Parameters
Type | Name | Description |
---|---|---|
IEndTagProperties | tagInfo |
Remarks
Paired tags must always appear in an XML-compliant way, i.e. each start tag must have a matching end tag on the same level of its scope.
InlinePlaceholderTag(IPlaceholderTagProperties)
Content interpreted as a placeholder that may appear inside text. Do not use this for method for paired placeholders.
Declaration
void InlinePlaceholderTag(IPlaceholderTagProperties tagInfo)
Parameters
Type | Name | Description |
---|---|---|
IPlaceholderTagProperties | tagInfo |
InlineStartTag(IStartTagProperties)
Content that is interpreted as the first of a set of paired tags that may appear inside text.
Declaration
void InlineStartTag(IStartTagProperties tagInfo)
Parameters
Type | Name | Description |
---|---|---|
IStartTagProperties | tagInfo |
Remarks
Paired tags must always appear in an XML-compliant way, i.e. each start tag must have a matching end tag on the same level of its scope.
LocationMark(LocationMarkerId)
Used with the message reporting mechanism to communicate locations associated with messages reported using the INativeContentStreamMessageReporter.
Declaration
void LocationMark(LocationMarkerId markerId)
Parameters
Type | Name | Description |
---|---|---|
LocationMarkerId | markerId | Unique identifier for the message; typically created using the default constructor |
LockedContentEnd()
Used to indicate the end of locked content in the stream.
Declaration
void LockedContentEnd()
Remarks
This method is called when the end of the content that should be locked has been reached. This call should always be paired with a prior call to StartLockedContent, with the locked content calls 'sandwiched' between these two calls.
LockedContentStart(ILockedContentProperties)
Used to indicate that the following content should be treated as locked content until a matched EndLockedContent() call is made.
Declaration
void LockedContentStart(ILockedContentProperties lockedContentInfo)
Parameters
Type | Name | Description |
---|---|---|
ILockedContentProperties | lockedContentInfo |
Remarks
When specific content in the stream needs to be treated as locked, matching calls to StartLockedContent and EndLockedContent are made. The content to be locked is 'sandwiched' between these calls.
ParagraphComments(ICommentProperties)
Used to set Paragraph comments to the current paragraph.
Declaration
void ParagraphComments(ICommentProperties commentInfo)
Parameters
Type | Name | Description |
---|---|---|
ICommentProperties | commentInfo | The comment information. |
RevisionEnd()
Used to indicate the end of revisioned content in the stream.
Declaration
void RevisionEnd()
RevisionStart(IRevisionProperties)
Used to indicate that the following content should be treated
as revisioned content until a matched RevisionEnd()
call is made.
Declaration
void RevisionStart(IRevisionProperties revisionInfo)
Parameters
Type | Name | Description |
---|---|---|
IRevisionProperties | revisionInfo | The revision information. |
StructureTag(IStructureTagProperties)
Content that is interpreted as a structural tag, i.e. a tag that does not appear inside translatable text.
Declaration
void StructureTag(IStructureTagProperties tagInfo)
Parameters
Type | Name | Description |
---|---|---|
IStructureTagProperties | tagInfo |
Text(ITextProperties)
Content that represents translatable text
Declaration
void Text(ITextProperties textInfo)
Parameters
Type | Name | Description |
---|---|---|
ITextProperties | textInfo |