|
1 | 1 | Latest Changes |
2 | 2 | ==== |
3 | 3 |
|
4 | | -v3.2.2 |
| 4 | +Changes after v3.0.0 |
5 | 5 | === |
6 | 6 |
|
7 | | -See https://github.com/axuno/SmartFormat/releases/tag/v3.2.2 |
8 | | - |
9 | | -v3.2.1 |
10 | | -=== |
11 | | - |
12 | | -### PluralLocalizationFormatter |
13 | | - |
14 | | -* Fix: Auto-detection of PluralLocalizationFormatter does not throw for values not convertible to decimal by @axunonb in https://github.com/axuno/SmartFormat/pull/330 Resolves #329 (Thanks to @BtbN) |
15 | | - |
16 | | - * Current behavior, introduced in v3.2.0: |
17 | | - When `PluralLocalizationFormatter.CanAutoDetect == true`, values that are not convertible to `decimal` will throw then trying to `IConvertible.ToDecimal(...)` |
18 | | - |
19 | | - * New behavior, equivalent to v3.1.0: |
20 | | - When `PluralLocalizationFormatter.CanAutoDetect == true`, for values that are not convertible to `decimal`, `IFormatter.TryEvaluateFormat(...)` will return `false` |
21 | | - |
22 | | -* Fix processing for Singular languages by @axunonb in https://github.com/axuno/SmartFormat/pull/322 |
23 | | - |
24 | | -### Other Changes |
25 | | - |
26 | | -* EditorConfig and appveyor.yml by @axunonb in https://github.com/axuno/SmartFormat/pull/319 |
27 | | -* Integrate Cysharp.ZString release v2.5.0 (26 Oct 2022) by @axunonb in https://github.com/axuno/SmartFormat/pull/323 |
28 | | -* Fix: PluralRules for Czech locale by @alexheb in https://github.com/axuno/SmartFormat/pull/325 |
29 | | -* Fixes for Demo App and NUnit TestAdapter by @axunonb in https://github.com/axuno/SmartFormat/pull/328 |
30 | | - |
31 | | -**Full Changelog**: https://github.com/axuno/SmartFormat/compare/v3.2.0...v3.2.1 |
32 | | - |
33 | | -v3.2.0 |
34 | | -=== |
35 | | -### Enhancements |
36 | | - |
37 | | -* Remove usage of Linq for less GC |
38 | | -* Add `IConvertable` support for `PluralLocalizationFormatter` and `ConditionalFormatter` |
39 | | -* `ListFormatter` |
40 | | - * ListFormatter handles selector name "Index" in `IEnumerable`s and `IList`s: 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(...)` |
41 | | - * Set the `ParentPlaceholder` property for item `Format`s |
42 | | - * Use `PooledObject<T>` where possible, so objects will be returned to `ObjectPool` also in case of exceptions |
43 | | - |
44 | | -### Fixes |
45 | | -* `FormatItem.AsSpan()` returns the correct name |
46 | | -* Remove potential namespace collisions: All public types in namespace `Cysharp.Text` are now internal |
47 | | - |
48 | | - |
49 | | -v3.1.0 |
50 | | -=== |
51 | | - |
52 | | -This is a feature update, that is released upon feedback from the community. |
53 | | - |
54 | | -### Thread-safe Mode |
55 | | - |
56 | | -Thread-safe mode is now enabled by default: |
57 | | -`SmartSettings.IsThreadSafeMode == true`.<br/> |
58 | | -This has no impact on the API. |
59 | | - |
60 | | -In case *SmartFormat* is *exclusively* utilized in a single-threaded context, `SmartSettings.IsThreadSafeMode=false` should be considered for enhanced performance. |
61 | | - |
62 | | -### Static `Smart` Methods for Formatting |
63 | | - |
64 | | -Static `Smart` methods like Smart.Format(*format*, *args*) can now be called in an `async` / multi-threaded context. |
65 | | - |
66 | | -The `SmartFormatter` instance returned by `Smart.Default` is flagged with the `ThreadStatic` attribute. |
67 | | - |
68 | | -### `ListFormatter` may have Placeholders in "spacers" |
69 | | - |
70 | | -Thanks to **[karljj1](https://github.com/axuno/SmartFormat/commits?author=karljj1)** for the PR. |
71 | | - |
72 | | -Before *v3.1.0* the format options for `ListFormatter` could only contain literal text. Now `Placeholder`s are allowed. |
73 | | - |
74 | | -#### Example: |
75 | | - |
76 | | -```CSharp |
77 | | -var args = new { |
78 | | - Names = new[] { "John", "Mary", "Amy" }, |
79 | | - IsAnd = true, // true or false |
80 | | - Split = ", " // comma and space as list separator |
81 | | -}; |
82 | | -_ = Smart.Format("{Names:list:{}|{Split}| {IsAnd:and|nor} }", args); |
83 | | -// Output for "IsAnd=true": "John, Mary and Amy" |
84 | | -// Output for "IsAnd=false": "John, Mary nor Amy" |
85 | | -``` |
86 | | -<br/> |
| 7 | +Please see release notes for all versions after v3.0.0 on https://github.com/axuno/SmartFormat/releases/ |
87 | 8 |
|
88 | 9 | v3.0.0 |
89 | 10 | === |
|
0 commit comments