SetMethodBindingConverterRegistry class¶
Defined in
Namespace: ReactiveUI.Binding
Assembly: ReactiveUI.Binding.dll
Full name: ReactiveUI.Binding.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-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481
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. |