Craig's Utility Library  4.0 Beta
Utilities.DataTypes.Formatters.GenericStringFormatter Class Reference

Generic string formatter More...

Inheritance diagram for Utilities.DataTypes.Formatters.GenericStringFormatter:
Utilities.DataTypes.Formatters.Interfaces.IStringFormatter

Public Member Functions

 GenericStringFormatter ()
 Constructor More...
 
string Format (string format, object arg, IFormatProvider formatProvider)
 Formats the string More...
 
virtual string Format (string Input, string FormatPattern)
 Formats the string based on the pattern More...
 
object GetFormat (Type formatType)
 Gets the format associated with the type More...
 

Protected Member Functions

virtual string GetMatchingInput (string Input, char FormatChar, out char MatchChar)
 Gets matching input More...
 
virtual bool IsValid (string FormatPattern)
 Checks if the format pattern is valid More...
 

Properties

virtual char AlphaChar [get, protected set]
 Represents alpha characters (defaults to @) More...
 
virtual char DigitChar [get, protected set]
 Represents digits (defaults to #) More...
 
virtual char EscapeChar [get, protected set]
 Represents the escape character (defaults to ) More...
 

Detailed Description

Generic string formatter

Definition at line 32 of file GenericStringFormatter.cs.

Constructor & Destructor Documentation

Utilities.DataTypes.Formatters.GenericStringFormatter.GenericStringFormatter ( )

Constructor

Definition at line 37 of file GenericStringFormatter.cs.

Member Function Documentation

string Utilities.DataTypes.Formatters.GenericStringFormatter.Format ( string  format,
object  arg,
IFormatProvider  formatProvider 
)

Formats the string

Parameters
formatFormat to use
argArgument object to use
formatProviderFormat provider to use
Returns
The formatted string

Definition at line 66 of file GenericStringFormatter.cs.

virtual string Utilities.DataTypes.Formatters.GenericStringFormatter.Format ( string  Input,
string  FormatPattern 
)
virtual

Formats the string based on the pattern

Parameters
InputInput string
FormatPatternFormat pattern
Returns
The formatted string

Implements Utilities.DataTypes.Formatters.Interfaces.IStringFormatter.

Definition at line 77 of file GenericStringFormatter.cs.

object Utilities.DataTypes.Formatters.GenericStringFormatter.GetFormat ( Type  formatType)

Gets the format associated with the type

Parameters
formatTypeFormat type
Returns
The appropriate formatter based on the type

Definition at line 105 of file GenericStringFormatter.cs.

virtual string Utilities.DataTypes.Formatters.GenericStringFormatter.GetMatchingInput ( string  Input,
char  FormatChar,
out char  MatchChar 
)
protectedvirtual

Gets matching input

Parameters
InputInput string
FormatCharCurrent format character
MatchCharThe matching character found
Returns
The remainder of the input string left

Definition at line 117 of file GenericStringFormatter.cs.

virtual bool Utilities.DataTypes.Formatters.GenericStringFormatter.IsValid ( string  FormatPattern)
protectedvirtual

Checks if the format pattern is valid

Parameters
FormatPatternFormat pattern
Returns
Returns true if it's valid, otherwise false

Definition at line 145 of file GenericStringFormatter.cs.

Property Documentation

virtual char Utilities.DataTypes.Formatters.GenericStringFormatter.AlphaChar
getprotected set

Represents alpha characters (defaults to @)

Definition at line 47 of file GenericStringFormatter.cs.

virtual char Utilities.DataTypes.Formatters.GenericStringFormatter.DigitChar
getprotected set

Represents digits (defaults to #)

Definition at line 52 of file GenericStringFormatter.cs.

virtual char Utilities.DataTypes.Formatters.GenericStringFormatter.EscapeChar
getprotected set

Represents the escape character (defaults to )

Definition at line 57 of file GenericStringFormatter.cs.


The documentation for this class was generated from the following file: