C# Class StringFormatEx.Plugins.ArrayPlugin

Inheritance: IStringFormatterPlugin
Datei anzeigen Open project: qstarin/StringFormatEx

Public Methods

Method Description
GetFormatExtensions ( ) : IEnumerable>
GetSourceExtensions ( ) : IEnumerable>

Private Methods

Method Description
DoArrayFormatting ( object sender, ExtendFormatEventArgs e ) : void
GetArrayIndex ( object sender, ExtendSourceEventArgs e ) : void
GetArraySource ( object sender, ExtendSourceEventArgs e ) : void

This allows an integer to be used as a selector to index an array (or list). Doesn't support ICollection because ICollection doesn't implement indexed items. This is better described using an example: CustomFormat("{Dates.2.Year}", {#1/1/2000#, #12/31/2999#, #9/9/9999#}) = "9999" The ".2" selector is used to reference Dates(2).

Method Details

GetFormatExtensions() public method

public GetFormatExtensions ( ) : IEnumerable>
return IEnumerable>

GetSourceExtensions() public method

public GetSourceExtensions ( ) : IEnumerable>
return IEnumerable>