You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AOT batch: nav POCO state, DataGrid DAM, ArrayOps runtime gate
Three independent AOT compatibility improvements from issue #70:
1. NavigationHandle no longer dictates serialization. GetState() returns
a new public NavigationState<TRoute> record; SetState takes that record.
Apps pick their own serializer (JSON via JsonSerializerContext, MessagePack,
binary, etc.). Removes the IL2026/IL3050 suppressions that were on
GetState/SetState and drops System.Text.Json from the framework call site.
2. DataGrid<T> propagates [DynamicallyAccessedMembers(PublicProperties |
PublicConstructors)] from the column-discovery code (AutoColumns<T>) up
through DataGridElement<T>, DataGridComponent<T>, both factory overloads,
and SelectionChanged<T>. The blanket #pragma warning disable IL2091 is
gone — the analyzer is satisfied without suppression.
3. ArrayOperations.Add / RemoveAt: replace [RequiresDynamicCode] with a
RuntimeFeature.IsDynamicCodeSupported check around Array.CreateInstance,
plus a focused [UnconditionalSuppressMessage(""AOT"", ""IL3050"")]. The
List<T>/ObservableCollection<T> path is now fully AOT-safe; the rare
T[] path throws NotSupportedException only when actually exercised
under native AOT.
Tests / samples / docs updated to teach the POCO + JsonSerializerContext
pattern. NavigationDemo's AppRoute gains [JsonPolymorphic] /
[JsonDerivedType] so polymorphic state round-trips correctly.
Build: 0 errors, 0 warnings.
Reactor.Tests: 8130 passed, 46 skipped, 0 failed.
Reactor.SelfTests: 735 passed, 0 failed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
`.Navigate(route, NavigateOptions)` — with transition override and `PushToBackStack` flag,
565
-
`.GetState(options?)` / `.SetState(json)` — serialize/restore full nav state.
565
+
`.GetState()` / `.SetState(state)` — capture/restore full nav state as a `NavigationState<TRoute>` POCO (serialize externally — e.g. `JsonSerializer.Serialize(snapshot, MyJsonContext.Default.NavigationStateRoute)`).
0 commit comments