SetMethodBindingConverterRegistry class¶
Attributes: [DebuggerDisplay("SetMethodBindingConverterRegistry")]
Defined in
Namespace: ReactiveUI
Assembly: ReactiveUI.Core.dll
Full name: ReactiveUI.SetMethodBindingConverterRegistry
Modifiers: public sealed
Summary¶
Thread-safe registry for set-method binding converters using a lock-free snapshot pattern.
Applies to
net10.0, net10.0-maccatalyst26.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net10.0-tvos26.0, net10.0-windows10.0.19041, net10.0-macos26.0, net10.0-ios26.0, net10.0-android36.0, net9.0, net9.0-tvos18.0, net9.0-macos15.0, net9.0-maccatalyst18.0, net9.0-windows10.0.19041, net9.0-ios18.0, net9.0-desktop1.0, net8.0, net8.0-windows10.0.19041, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.5, netstandard2.1, net481, net462, net471
Remarks¶
This registry uses a copy-on-write snapshot pattern optimized for read-heavy workloads:
-
Reads: Lock-free via a volatile read of the snapshot reference. Multiple readers can access the registry concurrently without contention.
-
Writes: Serialized under a lock. Writes clone the converter list, mutate the clone, and publish a new snapshot atomically.
-
Selection: Set-method converters are stored in a simple list (no type-pair grouping). When looking up a converter, each converter's runtime affinity is checked via GetAffinityForObjects. The converter with the highest affinity (> 0) is selected.
Set-method converters are used for specialized binding operations that require custom set behavior, such as populating collections or handling platform-specific controls.
Constructors¶
| Name | Summary |
|---|---|
| .ctor |
Methods¶
| Name | Summary |
|---|---|
| Register | Registers a set-method binding converter. |
| TryGetConverter | Attempts to retrieve the best set-method converter for the specified type pair. |
| GetAllConverters | Returns all registered set-method converters. |