Class UnknownFormatting
Represents a type of formatting that is unknown. The formatting name and its value can be retrieved from these properties.
Objects of this type are typically created as a result of parsing formatting types that are not known to the system. This class allows such formatting to be preserved and persisted.
Inherited Members
Namespace: Sdl.FileTypeSupport.Framework.Formatting
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public class UnknownFormatting : AbstractFormattingItem, IFormattingItem, ICloneable
Constructors
UnknownFormatting()
Empty constructor required by the spring framework to construct UnknownFormatting without formatting
Declaration
public UnknownFormatting()
UnknownFormatting(String, String)
Construction from a formatting type name and a value.
Declaration
public UnknownFormatting(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the formatting type. This value must be unique for all different types of formatting. The default formatting types use the value returned by GetDefaultName(MemberInfo) for their type names e.g. "Bold", "Italic", "FontName", etc. |
System.String | value | Value of formatting type, or |
Properties
FormattingName
The name of this type of the formatting
Declaration
public override string FormattingName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
LocalizedFormattingName
A localized representation of this type of formatting
Declaration
public override string LocalizedFormattingName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
StringValue
Returns the value of the formatting, same as Value.
Declaration
public override string StringValue { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Value
The value of this formatting as a string. This is the same as the StringValue property.
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
AcceptVisitor(IFormattingVisitor)
Calls VisitUnknownFormatting(UnknownFormatting) on the visitor.
Declaration
public override void AcceptVisitor(IFormattingVisitor visitor)
Parameters
Type | Name | Description |
---|---|---|
IFormattingVisitor | visitor |
Overrides
Clone()
Creates a clone of the unknown formatting.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object |
Overrides
SetFormattingName(String)
Allows the name of this formatting to be explicitly set (this is a read-only property in the base class).
Declaration
public void SetFormattingName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |