Interface IFormattingItemFactory
This factory can be used to construct formatting items from name/value pair strings, e.g. when de-serializing formatting information.
Namespace: Sdl.FileTypeSupport.Framework.Formatting
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface IFormattingItemFactory
Remarks
The Sdl.FileTypeSupport.Framework.Core.Utilities.Formatting.FormattingItemFactory
class provides a default
implementation of this interface, and it supports all strongly typed, well-known formatting types,
as defined in the IFormattingVisitor. The default factory uses UnknownFormatting
for anything else.
If you define your own additional formatting types, you can implement your own factory to ensure that these types are used during de-serialization.
Methods
CreateFormatting()
Creates a new empty formatting collection.
Declaration
IFormattingGroup CreateFormatting()
Returns
Type | Description |
---|---|
IFormattingGroup |
CreateFormattingItem(String, String)
Instantiates the most appropriate formatting item derived class and initializes it with the specified value.
Declaration
IFormattingItem CreateFormattingItem(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
System.String | value |
Returns
Type | Description |
---|---|
IFormattingItem |
Remarks
Compares the name against all known formatting types. If it matches one exactly, that type is created; otherwise an UnknownFormatting object is used instead.