C# Class Gammtek.Conduit.Text.Formatting.ScalarFormatInfo

Provides formatting services for scalar data types and for strings. These types include numeric types, Boolean, characters, date time, enumerations and strings. VerboseFormatInfo delegates calls to this class when one of the listed types is formatted. This class is internal and cannot be used directly.
Inheritance: VerboseFormatInfoBase
Datei anzeigen Open project: ME3Explorer/ME3Explorer Class Usage Examples

Private Properties

Property Type Description
AppendEnumFlags bool
AppendFriendlyTypeName bool
Format bool
FormatChar bool
FormatString bool
GetMaxValueLength int
GetMaxValueLength int
GetValueLength int
GetValueLength int
IsFormatApplicable bool

Public Methods

Method Description
Clone ( ) : object

Creates deep copy of this instance.

ScalarFormatInfo ( ) : System

Default constructor.

ScalarFormatInfo ( ScalarFormatInfo other ) : System

Copy constructor which initializes new instance and copies common values from another instance of this class.

ScalarFormatInfo ( VerboseFormatInfoBase other ) : System

Copy constructor which copies only values that are common to all classes derived from VerboseFormatInfoBase.

Private Methods

Method Description
AppendEnumFlags ( Enum value, StringBuilder sb, int &maxLength ) : bool

Appends names of enumeration constants that are present in the OR-ed value.

AppendFriendlyTypeName ( Type type, object instance, StringBuilder sb, int &maxLength ) : bool

Appends user friendly name for the given data type and appends it to string builder.

Format ( StringBuilder sb, string format, object arg, IFormatProvider formatProvider, int &maxLength ) : bool

Converts the value of a specified object to an equivalent string representation using specified format and culture-specific formatting information.

FormatChar ( StringBuilder sb, char c, bool quote, bool stringEscaping, int &maxLength ) : bool

Appends formatted presentation of a given character to the given string builder.

FormatString ( StringBuilder sb, string s, bool quote, int &maxLength ) : bool

Appends formatted string to the given string builder. String will be fully escaped.

GetMaxValueLength ( IEnumerator enumerator ) : int

Gets maximum length required to format any value from the given enumerator.

GetMaxValueLength ( IEnumerator enumerator, StringBuilder sb ) : int

Gets maximum length required to format any value from the given enumerator.

GetValueLength ( object value ) : int

Gets total length required to format specified value.

GetValueLength ( object value, StringBuilder sb ) : int

Gets total length required to format specified value.

IsFormatApplicable ( Type dataType ) : bool

Gets value indicating whether this formatter can format string which represents instance of given data type.

Method Details

Clone() public method

Creates deep copy of this instance.
public Clone ( ) : object
return object

ScalarFormatInfo() public method

Default constructor.
public ScalarFormatInfo ( ) : System
return System

ScalarFormatInfo() public method

Copy constructor which initializes new instance and copies common values from another instance of this class.
public ScalarFormatInfo ( ScalarFormatInfo other ) : System
other ScalarFormatInfo Instance from which common values should be copied.
return System

ScalarFormatInfo() public method

Copy constructor which copies only values that are common to all classes derived from VerboseFormatInfoBase.
public ScalarFormatInfo ( VerboseFormatInfoBase other ) : System
other VerboseFormatInfoBase Instance from which contents is copied to new instance of this class.
return System