Skip to content

ISetMethodBindingConverter.GetAffinityForObjects(Type?, Type?) method

Defined in

Type: ISetMethodBindingConverter 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

int GetAffinityForObjects(Type? fromType, Type? toType)

Summary: Returns a positive integer when this class supports PerformSet for this particular Type. If the method isn't supported at all, return a non-positive integer. When multiple implementations return a positive value, the host will use the one which returns the highest value. When in doubt, return '2' or '0'.

Parameters

NameTypeDescription
fromTypeType?The from type to convert from.
toTypeType?The target type to convert to.

Returns: int -- A positive integer if PerformSet is supported, zero or a negative value otherwise.