,--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
Summary: Executes the command a property holds with each value the sequence produces.
Type parameters
| Name | Description |
|---|---|
T | The type of the value offered as the command parameter. |
TTarget | The type declaring the command property. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The sequence driving the executions. |
target | TTarget? | The object declaring the command property. |
commandProperty | Expression | 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
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or commandProperty is null. |