StringToDateTimeTypeConverter.GetAffinityForObjects() method¶
Defined in
Type: StringToDateTimeTypeConverter
Namespace: ReactiveUI.Binding
Assembly: ReactiveUI.Binding.dll
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
public override int GetAffinityForObjects()
Inherited documentation
These docs were inherited from BindingTypeConverter<string, DateTime>. The member doesn't override them on this type.
Summary: Returns the affinity score for this converter.
Returns: int -- A positive integer indicating converter priority. Higher values win when multiple converters match. Return 0 if the converter cannot handle the type pair.
Remarks
Affinity Guidelines:
- 0 - Cannot convert (no conversion possible)
- 1 - Last resort converters (e.g., EqualityTypeConverter)
- 2 - Standard ReactiveUI core converters (string, numeric, datetime)
- 8 - Platform-specific standard converters (NSDate, WinForms controls)
- 100+ - Third-party override range (use to override ReactiveUI defaults)
When multiple converters match the same type pair, the converter with the highest affinity is selected. Third-party converters should return 100 or higher to override ReactiveUI defaults.