C# Class StringFormatEx.Plugins.Core.CustomFormatInfo

Contains all the data necessary to perform a CustomFormat. This class is split into "Source" and "Format" sections because it takes care of both functions.
Inheritance: ICustomSourceInfo
Exibir arquivo Open project: qstarin/StringFormatEx Class Usage Examples

Protected Properties

Property Type Description
cache object>.IDictionary

Public Methods

Method Description
CustomFormatNested ( ) : void

Performs the CustomFormat method on this object. This is the same as calling CustomFormat(Me)

FormatContains ( string value ) : bool

Checks if the Format contains a string. Ignores case.

FormatEquals ( string value ) : bool

Checks if the Format equals a string. Ignores case.

FormatStartsWith ( string value ) : bool

Checks if the Format starts with a string. Ignores case.

SetFormat ( string newFormat, bool newHasNested ) : void

This method should only be used internally. Updates the Format property for use in a ExtendCustomFormat event.

Write ( string text ) : void
Write ( string text, int start, int length ) : void

Writes a string to the output and sets the Handled flag. As an added bonus, automatically escapes the "\t" and "\n" flags

WriteLiteral ( string text ) : void
WriteLiteral ( string text, int start, int length ) : void

Writes a string to the output and sets the Handled flag. Does NOT escape any special characters! This is useful for filenames and such.

Private Methods

Method Description
CustomFormatInfo ( ExtendedStringFormatter formatter, TextWriter newOutput, IFormatProvider newProvider, string newFormat, object newArgs ) : System

This method should only be used internally.

CustomFormatInfo ( ExtendedStringFormatter formatter, TextWriter newOutput, string newFormat, object newArgs ) : System

This method should only be used internally.

SetSelector ( string newSelector, int newSelectorIndex ) : void

This method should only be used internally. Updates the Selector for use in the ExtendCustomSource event.

WriteError ( string message, PlaceholderInfo placeholder ) : void

Writes a string to the output and sets the Handled flag.

WriteEscaped ( string text ) : void
WriteEscaped ( string text, int start, int length ) : void

Writes a string to the output and sets the Handled flag. Effeciently escapes the "\t" and "\n" flags

WriteFast ( string text, int start, int length ) : void

Writes a string to the output and sets the Handled flag. Does not escape any characters.

WriteRegularText ( string format, int start, int length ) : void

Writes a string to the output and sets the Handled flag.

Method Details

CustomFormatNested() public method

Performs the CustomFormat method on this object. This is the same as calling CustomFormat(Me)
public CustomFormatNested ( ) : void
return void

FormatContains() public method

Checks if the Format contains a string. Ignores case.
public FormatContains ( string value ) : bool
value string
return bool

FormatEquals() public method

Checks if the Format equals a string. Ignores case.
public FormatEquals ( string value ) : bool
value string
return bool

FormatStartsWith() public method

Checks if the Format starts with a string. Ignores case.
public FormatStartsWith ( string value ) : bool
value string
return bool

SetFormat() public method

This method should only be used internally. Updates the Format property for use in a ExtendCustomFormat event.
public SetFormat ( string newFormat, bool newHasNested ) : void
newFormat string
newHasNested bool
return void

Write() public method

public Write ( string text ) : void
text string
return void

Write() public method

Writes a string to the output and sets the Handled flag. As an added bonus, automatically escapes the "\t" and "\n" flags
public Write ( string text, int start, int length ) : void
text string
start int
length int
return void

WriteLiteral() public method

public WriteLiteral ( string text ) : void
text string
return void

WriteLiteral() public method

Writes a string to the output and sets the Handled flag. Does NOT escape any special characters! This is useful for filenames and such.
public WriteLiteral ( string text, int start, int length ) : void
text string
start int
length int
return void

Property Details

cache protected_oe property

protected IDictionary cache
return object>.IDictionary