github axuno/SmartFormat v3.2.0

latest releases: v3.5.1, v3.5.0, v3.4.0...
2 years ago

Enhancements

  • Remove usage of Linq for less GC
  • Add IConvertable support for PluralLocalizationFormatter and ConditionalFormatter
  • ListFormatter
    • ListFormatter handles selector name "Index" in IEnumerables and ILists: In v1.6.1 a Selector was tested for having the name "index", even if data was not an IList, and returned the CollectionIndex. This is now implemented again in the ListFormatter.TryEvaluateSelector(...)
    • Set the ParentPlaceholder property for item Formats
    • Use PooledObject<T> where possible, so objects will be returned to ObjectPool also in case of exceptions

Fixes

  • FormatItem.AsSpan() returns the correct name
  • Remove potential namespace collisions: All public types in namespace Cysharp.Text are now internal

What's Changed

  • Upgrade projects targeting NET5.0 to NET6.0 by @axunonb in #286
  • Refactor suggestions by @karljj1 in #290
  • Refactored unit tests for ReflectionSource and thread-safe mode by @axunonb in #291
  • Convert solution to file-scoped namespacing by @axunonb in #292
  • Use is instead of checking the type info. by @karljj1 in #293
  • SonarCloud do not support analysis of forked PRs by @axunonb in #294
  • Avoid using Linq as it generates GC each time. by @karljj1 in #296
  • IConvertible support for plural and conditional formatters by @karljj1 in #300
  • Fixed: FormatItem.AsSpan() by @axunonb in #304
  • Refactor ListFormatter by @axunonb in #305
  • Ignore bools in plurals formatter. by @karljj1 in #306
  • Change all public types in namespace Cysharp.Text to internal by @axunonb in #309
  • ListFormatter handles selector name "Index" in IEnumerable and IList by @axunonb in #314
  • Bump version to v3.2.0 by @axunonb in #315

Full Changelog: v3.1.0...v3.2.0

Don't miss a new SmartFormat release

NewReleases is sending notifications on new releases.