ObservationAffinityChecker class¶
Attributes: [EditorBrowsable(EditorBrowsableState.1)]
Defined in
Namespace: ReactiveUI.Binding.Reactive.Fallback
Assembly: ReactiveUI.Binding.Reactive.dll
Full name: ReactiveUI.Binding.Reactive.Fallback.ObservationAffinityChecker
Modifiers: public static
Summary¶
Checks whether any user-registered ICreatesObservableForProperty implementation has higher affinity than the source generator's compile-time plugin for a given type. Used by generated code to allow user-registered plugins to override source-generated observation at runtime.
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-tvos18.0, net9.0-maccatalyst18.0, net9.0-ios18.0, net9.0-macos15.0, net9.0-desktop1.0, net8.0, net8.0-macos14.5, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, netstandard2.1, net481, net462, net471
Remarks¶
Every generated observation and binding asks this before it does anything else, so the answer is on the path of every binding an application creates. The registered set is resolved once and kept rather than re-read from the locator each time: asking the locator allocates an enumeration per call, which a view with many bindings pays for repeatedly and never gets anything back for. Refresh drops the resolved set for a host that registers a plugin after the first binding.
Methods¶
| Name | Summary |
|---|---|
| static Refresh | Re-reads the registered plugins, for a host that registers them after the first binding. |
| static HasHigherAffinityPlugin | Returns true if a registered [ICreatesObservableForProperty](# outranks generatedAffinity. |
| static FindHigherAffinityPlugin | Finds the registered [ICreatesObservableForProperty](# that outranks generatedAffinity. |