Interface ISubContentGenerator
Represents a set of bilingual content processors, native content processors, and a native writer, which work together to output native files from bilingual content.
Inherited Members
Namespace: SdlSdl.FileTypeSupportFrameworkIntegrationApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface ISubContentGenerator : IBilingualProcessorContainer, IAbstractGenerator, IFileTypeDefinitionAware
Properties
AllComponents
Called by the framework during component initialization to initialize components that implement special interfaces such as ISharedObjectsAware before processing starts.
Declaration
IEnumerable<object> AllComponents { get; }
Property Value
Type | Description |
---|---|
IEnumerableobject | All native and bilingual file type components |
BilingualWriter
Writer for a bilingual output format, or null
if a native output format is used.
Declaration
IBilingualWriter BilingualWriter { get; set; }
Property Value
Type | Description |
---|---|
IBilingualWriter |
Remarks
This is intended for writers of bilingual formats representing single files (e.g. TTX, ITD, etc.). It is NOT for bilingual document writers (e.g. SDL XLIFF). Those should rather be used with a IBilingualDocumentGenerator.
When a bilingual writer is set, the ToNativeConverter and the NativeSubContentGenerator are not used.
FileTweakers
The file tweakers used by the generator, in the order in which they will be invoked.
File tweakers should be added using AddFileTweaker(IFilePostTweaker).
Declaration
IEnumerable<IFilePostTweaker> FileTweakers { get; }
Property Value
Type | Description |
---|---|
IEnumerableIFilePostTweaker |
Input
All content input to the converter is passed as calls on this interface.
Declaration
IBilingualContentHandler Input { get; }
Property Value
Type | Description |
---|---|
IBilingualContentHandler |
ItemFactory
The framework will set this property as part of the initialization.
While building bilingual components this factory should be used to create any items that are inserted in the bilingual content model.
Declaration
IDocumentItemFactory ItemFactory { get; set; }
Property Value
Type | Description |
---|---|
IDocumentItemFactory |
NativeOutputProperties
Properties and settings used when writing the native file. If set, these properties are communicated to all file type components that implement the INativeContentCycleAware interface.
Declaration
INativeOutputFileProperties NativeOutputProperties { get; set; }
Property Value
Type | Description |
---|---|
INativeOutputFileProperties |
NativeSubContentGenerator
The components used to output native content to a file in native format in the source or target language.
Declaration
INativeSubContentGenerator NativeSubContentGenerator { get; set; }
Property Value
Type | Description |
---|---|
INativeSubContentGenerator |
NativeVerifiers
The native verifiers that are currently used by the generator.
Verifiers should be added using AddNativeVerifier(INativeFileVerifier).
Declaration
IEnumerable<INativeFileVerifier> NativeVerifiers { get; }
Property Value
Type | Description |
---|---|
IEnumerableINativeFileVerifier |
ToNativeConverter
The component used when converting bilingual content into native source or target content.
Declaration
IBilingualToNativeConverter ToNativeConverter { get; set; }
Property Value
Type | Description |
---|---|
IBilingualToNativeConverter |
Methods
AddFileTweaker(IFilePostTweaker)
Appends a file tweaker that will be used to modify the output file after generating.
Declaration
void AddFileTweaker(IFilePostTweaker tweaker)
Parameters
Type | Name | Description |
---|---|---|
IFilePostTweaker | tweaker |
AddNativeVerifier(INativeFileVerifier)
Appends a native verifier that will be run on the output file after it has been generated.
Declaration
void AddNativeVerifier(INativeFileVerifier verifier)
Parameters
Type | Name | Description |
---|---|---|
INativeFileVerifier | verifier | The native verifier to add |
RemoveFileTweaker(IFilePostTweaker)
Removes the tweaker from the generator.
Declaration
void RemoveFileTweaker(IFilePostTweaker tweakerToRemove)
Parameters
Type | Name | Description |
---|---|---|
IFilePostTweaker | tweakerToRemove | The file tweaker to remove |
Events
Message
Raised when a message is reported by a file type component.
Declaration
event EventHandler<MessageEventArgs> Message
Event Type
Type | Description |
---|---|
EventHandlerMessageEventArgs |
Remarks
The file path property needs not be set in the event args.