IReactiveObjectStateSlot interface¶
Defined in
Namespace: ReactiveUI.Reactive
Assembly: ReactiveUI.Reactive.dll
Full name: ReactiveUI.Reactive.IReactiveObjectStateSlot
Modifiers: public abstract
Summary¶
Exposes a single storage slot on a reactive object so IReactiveObjectExtensions can keep that object's notification state (change/changing/exception subjects, suppression counters) on the instance itself rather than in a process-wide ConditionalWeakTable. This removes a per-notification table lookup and the associated allocations on the hot path.
Applies to
net10.0, net10.0-ios26.0, net10.0-android36.0, net10.0-maccatalyst26.0, net10.0-macos26.0, net10.0-tvos26.0, net9.0, net8.0, net462, net481
Remarks¶
ReactiveObject and the platform UI base types implement this (explicitly, so it stays off their public surface). Hand-rolled IReactiveObject implementers are not required to: those without a slot transparently fall back to the table, so this is a performance opt-in and not a breaking requirement.
The slot holds an opaque framework-internal object; consumers must not read or write it directly. A reference is returned so the framework can initialize it atomically on first access.
Methods¶
| Name | Summary |
|---|---|
| GetReactiveStateSlot | Returns a reference to this object's single reactive notification-state slot. The framework uses the reference to lazily and atomically initialize the slot; the stored value is... |