Skip to content

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-tvos18.0, net9.0-maccatalyst18.0, net9.0-ios18.0, net9.0-macos15.0, net9.0-desktop1.0, net8.0, net8.0-macos14.5, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, netstandard2.1, net481, net462, net471

public static IObservable<T> Choose<T>(object source, Expression expression, string propertyName, bool beforeChange, int generatedAffinity, Func<object, T?> getter, IObservable<T> generated)

View source

Summary: Returns the registration's observation of a property, or the generated one when none outranks it.

Type parameters

NameDescription
TThe type of the property value.

Parameters

NameTypeDescription
sourceobjectThe object the property is read from.
expressionExpressionThe property as the generated code names it.
propertyNamestringThe name of the property being observed.
beforeChangeboolWhether before-change notifications are being observed.
generatedAffinityintThe affinity of the mechanism the generator picked for this link.
getterFuncReads the current property value from the source.
generatedIObservableThe observation the generator emitted for this link.

Returns: IObservable -- Whichever of the two should drive this link.

Remarks

        The link does not filter consecutive equal values: a chain applies that once over its whole result, and
        filtering per link as well would drop a value a later link still has to re-root on.