Commit 737b280
authored
breaking: seal ValidationState as record, performance improvements, replace Polyfill NuGet with local polyfills (#878)
* breaking: seal ValidationState as record, performance improvements, replace Polyfill NuGet with local polyfills
- Convert ValidationState from a class with primary constructor to a sealed record, adding IEquatable<ValidationState> support and init accessors for IsValid.
- Remove Polyfill NuGet package from the core library and replace with local polyfill files for RequiresDynamicCodeAttribute, RequiresUnreferencedCodeAttribute, IsExternalInit, NotNullAttribute, and CallerArgumentExpressionAttribute.
- Remove all 28 #if NET6_0_OR_GREATER / #endif guards around AOT attributes, making them unconditionally applied via the local polyfills.
- Optimize ValidationStateComparer to compare validation text element-by-element instead of joining to a single string, and use ReferenceEquals for fast-path null/identity checks.
- Optimize HashCode computation in ValidationStateComparer using a local HashCode polyfill with per-element ordinal string hashing.
- Add lazy activation pattern to BasePropertyValidation and ValidationContext to defer observable subscriptions until first access.
- Convert internal collection types (ArrayValidationText, SingleValidationText, ReadOnlyDisposableCollection) to use primary constructors and add XML documentation.
- Add #if NET8_0_OR_GREATER guard in ExpressionExtensions to use the faster char overload of string.Join on supported frameworks.
- Expand ValidationText with internal helper methods (CreateValidationText, CopyArray) and optimize array-backed paths to avoid unnecessary allocations.
- Add comprehensive unit tests for InternalCollectionTests, NotifyDataErrorInfoTests, ValidationContextTests, and ValidationStateComparerTests.
- Fix minor XML doc typos in IValidatableViewModel and IValidationContext.
- Update README to replace StackOverflow link with GitHub Discussions and remove duplicate Feedback section.
- Update API approval baselines to reflect the sealed record change to ValidationState.
* Update the copyright year
* Update core team info
* Stop producing nupkg for sample apps
* Cleanup the codecov.yml file1 parent 55fc677 commit 737b280
File tree
101 files changed
+1701
-324
lines changed- src
- ReactiveUI.Validation.AndroidX/Extensions
- ReactiveUI.Validation
- Abstractions
- Collections
- Comparators
- Components
- Abstractions
- Contexts
- Extensions
- Formatters
- Abstractions
- Helpers
- Polyfills
- States
- ValidationBindings
- Abstractions
- samples
- AvaloniaApplication1.Desktop
- AvaloniaApplication1
- ViewModels
- Views
- LoginApp.Avalonia.Desktop
- LoginApp.Avalonia
- Services
- Views
- LoginApp.WinForms
- Services
- Views
- LoginApp.Wpf
- Services
- Views
- LoginApp
- Services
- ViewModels
- tests/ReactiveUI.Validation.Tests
- API
- Models
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
101 files changed
+1701
-324
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
17 | 42 | | |
18 | 43 | | |
19 | 44 | | |
| |||
282 | 307 | | |
283 | 308 | | |
284 | 309 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | 310 | | |
290 | 311 | | |
291 | 312 | | |
292 | 313 | | |
293 | 314 | | |
294 | 315 | | |
295 | | - | |
| 316 | + | |
296 | 317 | | |
297 | 318 | | |
298 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
Lines changed: 33 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
26 | 44 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
15 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
16 | 29 | | |
17 | 30 | | |
18 | 31 | | |
| |||
45 | 58 | | |
46 | 59 | | |
47 | 60 | | |
48 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
49 | 66 | | |
50 | 67 | | |
51 | 68 | | |
| |||
Lines changed: 29 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | | - | |
21 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
22 | 35 | | |
23 | 36 | | |
24 | | - | |
| 37 | + | |
25 | 38 | | |
26 | 39 | | |
| 40 | + | |
27 | 41 | | |
28 | 42 | | |
29 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
30 | 49 | | |
0 commit comments