IBindingFallbackConverter interface¶
Defined in
Namespace: ReactiveUI.Binding
Assembly: ReactiveUI.Binding.dll
Full name: ReactiveUI.Binding.IBindingFallbackConverter
Modifiers: public abstract
Summary¶
Represents a converter that can handle runtime type pairs not covered by typed converters.
Fallback converters are consulted only after all typed converters fail to match.
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
Class hierarchy
classDiagram
class IBindingFallbackConverter
class IEnableLogger {
<>
}
IEnableLogger <|.. IBindingFallbackConverter
Implements: IEnableLogger
Remarks¶
Fallback converters exist for scenarios where conversion logic depends on runtime type characteristics that cannot be expressed as compile-time generic pairs.
Common use cases:
- Component model type descriptors (reflection-based)
- Platform-specific type conversions
- IConvertible-based conversions
Affinity Guidelines:
- 1. 0 = Not supported
- 2. 1 = Last resort (ComponentModel/TypeDescriptor)
- 3. 3 = Broad runtime conversion (IConvertible/numeric widening)
- 4. 5 = Strong structural match (enum parsing, nullable unwrapping)
Do not return affinity greater than or equal to 10 to avoid competing with typed converters.
Methods¶
| Name | Summary |
|---|---|
| GetAffinityForObjects | Calculates affinity for the specified runtime type pair. |
| TryConvert | Attempts to convert the value to the target type. |