C# Class Yea.DataTypes.Formatters.GenericStringFormatter

Generic string formatter
Inheritance: IFormatProvider, ICustomFormatter, IStringFormatter
Datei anzeigen Open project: OxPatient/Rule-Engine

Public Methods

Method Description
Format ( string format, object arg, IFormatProvider formatProvider ) : string

Formats the string

Format ( string input, string formatPattern ) : string

Formats the string based on the pattern

GenericStringFormatter ( ) : System

Constructor

GetFormat ( Type formatType ) : object

Gets the format associated with the type

Private Methods

Method Description
GetMatchingInput ( string input, char formatChar, char &matchChar ) : string

Gets matching input

IsValid ( string formatPattern ) : bool

Checks if the format pattern is valid

Method Details

Format() public method

Formats the string
public Format ( string format, object arg, IFormatProvider formatProvider ) : string
format string Format to use
arg object Argument object to use
formatProvider IFormatProvider Format provider to use
return string

Format() public method

Formats the string based on the pattern
public Format ( string input, string formatPattern ) : string
input string Input string
formatPattern string Format pattern
return string

GenericStringFormatter() public method

Constructor
public GenericStringFormatter ( ) : System
return System

GetFormat() public method

Gets the format associated with the type
public GetFormat ( Type formatType ) : object
formatType System.Type Format type
return object