C# Class WebApplications.Utilities.Formatting.FormatChunk

Inheritance: IFormattable, IWriteable
Show file Open project: webappsuk/CoreLibraries Class Usage Examples

Public Properties

Property Type Description
Alignment int
IsControl bool
IsResolved bool

Private Properties

Property Type Description
Append FormatChunk
AppendChunk void
DeepCopyChunks void
FormatChunk System
FormatChunk System
FormatChunk System
Parse IEnumerable
ToString string

Public Methods

Method Description
FormatChunk ( Optional value = default(Optional<object>) ) : System

Creates a non-fill point chunk.

FormatChunk ( [ chunk, Optional value ) : System

Creates a clone of the FormatChunk, changing the resolved value.

ToString ( ) : string

Returns a System.String that represents this instance.

WriteTo ( TextWriter writer, string format = null ) : void

Writes this instance to the writer, using the optional format.

Private Methods

Method Description
Append ( [ value, [ resolver = null ) : FormatChunk
AppendChunk ( [ chunk ) : void
DeepCopyChunks ( [ source, [ destination ) : void

Performs a deep copy of the child chunks from source to destination.

FormatChunk ( [ resolver, [ tag, [ alignment, [ format ) : System

Initializes a new instance of the FormatChunk class.

FormatChunk ( [ resolver, [ tag, int alignment, [ format, Optional value = default(Optional<object>) ) : System

Initializes a new instance of the FormatChunk class.

FormatChunk ( [ resolver, [ tag, int alignment, [ format, bool isResolved, [ value, bool isControl ) : System

Initializes a new instance of the FormatChunk class.

Parse ( [ value, [ resolver = null ) : IEnumerable
ToString ( [ format, [ formatProvider = null ) : string

Method Details

FormatChunk() public method

Creates a non-fill point chunk.
public FormatChunk ( Optional value = default(Optional<object>) ) : System
value Optional The value.
return System

FormatChunk() public method

Creates a clone of the FormatChunk, changing the resolved value.
public FormatChunk ( [ chunk, Optional value ) : System
chunk [ The chunk.
value Optional The value.
return System

ToString() public method

Returns a System.String that represents this instance.
public ToString ( ) : string
return string

WriteTo() public method

Writes this instance to the writer, using the optional format.
public WriteTo ( TextWriter writer, string format = null ) : void
writer TextWriter The writer.
format string The format.
return void

Property Details

Alignment public property

The alignment, if any; otherwise 0. (e.g. -3 for '{0,-3:G}'
public int Alignment
return int

IsControl public property

Control chunks are never written out when you call ToString(), but can be used by consumers of a FormatBuilder to extend functionality.
public bool IsControl
return bool

IsResolved public property

Gets a value indicating whether this instance is resolved.
public bool IsResolved
return bool