Skip to content

,--1,System.Linq.Expressions.Expression{System.Func{--1,--2}})} ,--1,System.Linq.Expressions.Expression{System.Func{--1,--2}},System.Object)} ,--1,System.Linq.Expressions.Expression{System.Func{--1,--2}},ReactiveUI.Binding.Reactive.IBindingTypeConverter)} ,--1,System.Linq.Expressions.Expression{System.Func{--1,--2}},System.Object,ReactiveUI.Binding.Reactive.IBindingTypeConverter)}

ReactiveUIBindingExtensions.BindToUnsafe(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

Overloads

  • 1. public static IDisposable BindToUnsafe<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property) where TTarget : class
  • 2. public static IDisposable BindToUnsafe<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, object? conversionHint) where TTarget : class
  • 3. public static IDisposable BindToUnsafe<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, IBindingTypeConverter? converterOverride) where TTarget : class
  • 4. public static IDisposable BindToUnsafe<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, object? conversionHint, IBindingTypeConverter? converterOverride) where TTarget : class

1. Overload

Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")]

public static IDisposable BindToUnsafe<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property) where TTarget : class

View source

Summary: Applies an observable stream to a target property. Conceptually similar to source.Subscribe(x => target.property = x).

Type parameters

NameDescription
TValueThe type of the value produced by the source observable.
TTargetThe type of the target object.
TTargetValueThe type of the property on the target object.

Parameters

NameTypeDescription
sourceIObservableThe observable stream to bind to a target property.
targetTTarget?The target object whose property will be set.
propertyExpression>An expression that selects the target property to set.

Returns: IDisposable -- A disposable that, when disposed, disconnects the binding.

Remarks

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

2. Overload

Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")]

public static IDisposable BindToUnsafe<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, object? conversionHint) where TTarget : class

View source

Summary: Applies an observable stream to a target property, using the supplied conversion hint when a converter is required to coerce the source value to the target property type.

Type parameters

NameDescription
TValueThe type of the value produced by the source observable.
TTargetThe type of the target object.
TTargetValueThe type of the property on the target object.

Parameters

NameTypeDescription
sourceIObservableThe observable stream to bind to a target property.
targetTTarget?The target object whose property will be set.
propertyExpression>An expression that selects the target property to set.
conversionHintobject?An object that provides a hint to the converter. The semantics are defined by the converter.

Returns: IDisposable -- A disposable that, when disposed, disconnects the binding.

Remarks

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

3. Overload

Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")]

public static IDisposable BindToUnsafe<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, IBindingTypeConverter? converterOverride) where TTarget : class

View source

Summary: Applies an observable stream to a target property, using the supplied converter to coerce the source value to the target property type.

Type parameters

NameDescription
TValueThe type of the value produced by the source observable.
TTargetThe type of the target object.
TTargetValueThe type of the property on the target object.

Parameters

NameTypeDescription
sourceIObservableThe observable stream to bind to a target property.
targetTTarget?The target object whose property will be set.
propertyExpression>An expression that selects the target property to set.
converterOverride[IBindingTypeConverter?](#An explicit converter to use when converting the source value to the target property type.

Returns: IDisposable -- A disposable that, when disposed, disconnects the binding.

Remarks

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

4. Overload

Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")]

public static IDisposable BindToUnsafe<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, object? conversionHint, IBindingTypeConverter? converterOverride) where TTarget : class

View source

Summary: Applies an observable stream to a target property, using the supplied converter and conversion hint to coerce the source value to the target property type.

Type parameters

NameDescription
TValueThe type of the value produced by the source observable.
TTargetThe type of the target object.
TTargetValueThe type of the property on the target object.

Parameters

NameTypeDescription
sourceIObservableThe observable stream to bind to a target property.
targetTTarget?The target object whose property will be set.
propertyExpression>An expression that selects the target property to set.
conversionHintobject?An object that provides a hint to the converter. The semantics are defined by the converter.
converterOverride[IBindingTypeConverter?](#An explicit converter to use when converting the source value to the target property type.

Returns: IDisposable -- A disposable that, when disposed, disconnects the binding.

Remarks

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