C# 클래스 StringFormatEx.ExtendedStringFormatter

파일 보기 프로젝트 열기: qstarin/StringFormatEx 1 사용 예제들

공개 메소드들

메소드 설명
AddPlugin ( IStringFormatterPlugin plugin ) : void
AddPlugins ( IEnumerable plugins ) : void
CreateDefault ( ) : ExtendedStringFormatter
CreateDefaultPlugins ( ) : IStringFormatterPlugin[]
CreateDefaultThatThrowsOnErrors ( ) : ExtendedStringFormatter
FormatEx ( IFormatProvider formatProvider, string format ) : string

Formats the format string using the parameters provided.

FormatEx ( string format ) : string
FormatEx ( Stream output, IFormatProvider formatProvider, string format ) : void
FormatEx ( Stream output, string format ) : void
FormatEx ( StringBuilder output, IFormatProvider formatProvider, string format ) : void
FormatEx ( StringBuilder output, string format ) : void
FormatEx ( TextWriter output, IFormatProvider formatProvider, string format ) : void
FormatEx ( TextWriter output, string format ) : void

비공개 메소드들

메소드 설명
FormatExInternal ( CustomFormatInfo info ) : void

Does the actual work.

NextPlaceholder ( string format, int startIndex, int endIndex, PlaceholderInfo &placeholder ) : bool

Returns True if the placeholder was formatted correctly; False if a placeholder couldn't be found. Outputs all relevant placeholder information. This function takes the place of the Regular Expression. It is faster and more direct, and does not suffer from Regex endless loops. In tests, this nearly doubles the speed vs Regex.

OnExtendFormatEvent ( ExtendFormatEventArgs e ) : void
OnExtendSourceEvent ( ExtendSourceEventArgs e ) : void
OnInvalidFormat ( string format, CustomFormatInfo info, PlaceholderInfo placeholder, Exception ex ) : void

Determines what to do when an Invalid Selector is found.

OnInvalidSelector ( string format, CustomFormatInfo info, PlaceholderInfo placeholder ) : bool

Determines what to do when an Invalid Selector is found. Returns True if we should just continue; False if we should skip this item.

메소드 상세

AddPlugin() 공개 메소드

public AddPlugin ( IStringFormatterPlugin plugin ) : void
plugin IStringFormatterPlugin
리턴 void

AddPlugins() 공개 메소드

public AddPlugins ( IEnumerable plugins ) : void
plugins IEnumerable
리턴 void

CreateDefault() 공개 정적인 메소드

public static CreateDefault ( ) : ExtendedStringFormatter
리턴 ExtendedStringFormatter

CreateDefaultPlugins() 공개 정적인 메소드

public static CreateDefaultPlugins ( ) : IStringFormatterPlugin[]
리턴 IStringFormatterPlugin[]

CreateDefaultThatThrowsOnErrors() 공개 정적인 메소드

public static CreateDefaultThatThrowsOnErrors ( ) : ExtendedStringFormatter
리턴 ExtendedStringFormatter

FormatEx() 공개 메소드

Formats the format string using the parameters provided.
public FormatEx ( IFormatProvider formatProvider, string format ) : string
formatProvider IFormatProvider
format string
리턴 string

FormatEx() 공개 메소드

public FormatEx ( string format ) : string
format string
리턴 string

FormatEx() 공개 메소드

public FormatEx ( Stream output, IFormatProvider formatProvider, string format ) : void
output Stream
formatProvider IFormatProvider
format string
리턴 void

FormatEx() 공개 메소드

public FormatEx ( Stream output, string format ) : void
output Stream
format string
리턴 void

FormatEx() 공개 메소드

public FormatEx ( StringBuilder output, IFormatProvider formatProvider, string format ) : void
output StringBuilder
formatProvider IFormatProvider
format string
리턴 void

FormatEx() 공개 메소드

public FormatEx ( StringBuilder output, string format ) : void
output StringBuilder
format string
리턴 void

FormatEx() 공개 메소드

public FormatEx ( TextWriter output, IFormatProvider formatProvider, string format ) : void
output System.IO.TextWriter
formatProvider IFormatProvider
format string
리턴 void

FormatEx() 공개 메소드

public FormatEx ( TextWriter output, string format ) : void
output System.IO.TextWriter
format string
리턴 void