Releases: andywilsonuk/StringTokenFormatter
Releases · andywilsonuk/StringTokenFormatter
v9.0
For breaking changes, see v9 migration notes.
- Lowered .NET requrement thanks to Polysharp
- Feature parity with
string.Formatfor better performance - Introduced Commands (replacement for Block Commands)
- New Map command for inline value mapping
- Reworked Loop command to support sequences
- Formatter Definitions provide strongly-typed formatters in preference to custom format providers
- Added
TokenValueFormatExceptionto handle formatting errors
- Added
- Improved library usability
InterpolatedStringResolverfleshed out to become preferred method over string extensionsTokenValueContainerBuilderis now fluent- Value Converters now support any function return type not just
Func<string>andFunc<object> - General convenience methods added
ObjectTokenValueContainersupport for structs
- Better validation of Settings and arguments
- Settings can also be validation ahead of use
- Internal structure improvements
v8.0
Reworked InterpolatedStringExpander for Block Commands
- Conditional block command replacing conditional prefixed token
- Loop block command
ExpanderContextimplementationExpandedStringBuilderwrapsStringBuilder
InterpolatedString
InterpolatedStringSegmentis now abstract with addition concrete types- Tokens method updated to support block commands
Quality improvements
- Better input validation throughout
- Additional exception types and more consistent usages
- Tests now run against both .net 8 and .net framework 4.8
FrozenDictionary support in .net 8
TokenValueContainers
- Enforced
TokenValueContainerFactoryusage TokenValueContainerclasses are now sealed with private constructorsFrozenmethod onDictionaryTokenValueContainerandObjectTokenValueContainerin .net 8
TokenValueConverters
- Renamed factory to
TokenValueConverterFactoryfor better consistency - Added
ToStringConverterfor easier support of classes with overriddenToStringmethods
v7.3
- Changed net48 target framework to netstandard2.0 (still needs C# 10)
- Added Parser support for .net7 regex source generation
- Updated default Condition token start and end markers to avoid conflict with format separator
- Tokens
HashSetnow strips Condition token markers - Reworked Expander for performance and readability
- Added exception when token value cannot be converted due to missing converter
v7.2
- Added composite container builder
TokenValueContainerBuilderwith hierarchical container support (finally!) - Supported
ValueTupleas key/value pairs throughout - Added
Defaultsettings property - Added
Tokenizemethod asTokenSyntaxextension to get wrapped token names - Replaced Moq with fakes to aid readability
- Bumped Test project nuget packages
v7.1
- Added Conditions, see additional features
- Added better FormatException handling including new default setting to throw on format error
v7.0
v7.0
v6.1
Re-added sign key