Skip to content

,--1,System.Linq.Expressions.Expression})}

ReactiveUIBindingExtensions.InvokeCommandUnsafe(IObservable, TTarget?, Expression>) method

Defined in

Type: ReactiveUIBindingExtensions Namespace: ReactiveUI.Binding.Reactive Assembly: ReactiveUI.Binding.Reactive.dll

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

Attributes: [RequiresUnreferencedCode("Runtime command fallback resolves the property chain by reflection.")]

public static IDisposable InvokeCommandUnsafe<T, TTarget>(this IObservable<T> source, TTarget? target, Expression<Func<TTarget, ICommand?>> commandProperty) where TTarget : class

View source

Summary: Executes the command a property holds with each value the sequence produces.

Type parameters

NameDescription
TThe type of the value offered as the command parameter.
TTargetThe type declaring the command property.

Parameters

NameTypeDescription
sourceIObservableThe sequence driving the executions.
targetTTarget?The object declaring the command property.
commandPropertyExpression>An expression that selects the command property to execute.

Returns: IDisposable -- A disposable that, when disposed, stops executing the command and stops observing the property.

Remarks

Resolves the property chain by reflection, for an expression the generator could not read.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or commandProperty is null.