- Fixes issue #94
- Characters Literals in Format Strings
- Improved working with several data sources: SmartObjects
- Changes in SmartSettings
- Fixed signing assemblies
- ReflectionSource now also gets members from base classes
- Added nesting and list tests
- Added coding samples
- Improved source xml docs
- Extended Wiki documentation for error handling and common pitfalls
- No more ambiguity between named formatters and string.Format formatting arguments: The parser checks whether the parsed name exists in one of the formatter extensions.
- SmartFormatter and Parser default to ErrorAction = ErrorAction.Ignore in release AND debug mode
- SmartFormatter has EventHandler OnFormattingFailure
- Parser has EventHandler OnParsingFailure
- Obsolete FormatItem.Text property removed (was replaced by RawText property some time ago)
- Assemblies are signed with a strong name key file
- Supported frameworks are .Net 4.0, .Net 4.5, .Net Core - dropped .Net 3.5 and earlier
- Added an icon to the nuget package
- Fixed issue with parsing named formatter options (#45)
- Minor changes to the Extensions API:
- Added fields to
ISelectorInfo - Made
Textobsolete in favor ofRawText.
- Added
TemplateFormatter. Allows you to register named templates, to be used within other templates.
Note: the TemplateFormatter extension is not a default extension, and must be added manually.
- Added "Nested Scopes" feature. This allows a nested template to
easily access outer scopes, without tricky workarounds.
For example: in"{Person: {Address: {City} {FirstName} } }",{City}will come fromAddress, but{FirstName}will come fromPerson.
This will work especially well with conditional formatting!
- Massive improvements to the Extension API. Code is cleaner and easier to use.
- Breaking changes: Any custom Extensions will need to be updated to match the new API.
Long story short, instead of 5 parameters passed toIFormatter.EvaluateFormat, it now just gets a singleFormatterInfoargument that contains all parameters. - Added the "choose" formatter, to eventually replace the ConditionalFormatter.
Hopefully it's self explanatory with these usage examples:
"{0:choose(1|2|3):one|two|three|default}"works like a switch statement"{0:choose(null):nothing|{something}}"can do null checking"{Gender:choose(Male|Female):his|her}"works great with Enums
- Added "Named Formatters", which allows you to use a
specific formatter by specifying its name.
For example, "{0:plural: ___ }" will use the Plural formatter, and "{0:default: ___ }" will use the default formatter. - Added "Formatter Options", which allows you to specify options
for a named formatter. This will be used in the near future.
For example, "{0:name(options): ___ }"
- Added .NET v3.5 and .NET v4.0 builds
- Added "releases" folder to hold official releases
- Added
UseAlternativeBracesmethod, so that templates can use alternative characters - Added
SmartFormatter.GetFormatterExtensionandGetSourceExtensionmethods, which can be used to configure extensions - Added
DefaultTwoLetterISOLanguageNameproperties to theTimeSpanFormatterandPluralLocalizationFormatter - Fixed
AddExtensionsto insert new extensions before existing ones (otherwise, it's pretty useless) (#17)
Converted from "CustomFormat" (VB.NET)