Skip to content

})} },System.Reactive.Concurrency.TaskObservationOptions)} },System.Reactive.Concurrency.IScheduler)} })} },System.Reactive.Concurrency.TaskObservationOptions)} },System.Reactive.Concurrency.IScheduler)} }})} }})} }},System.Reactive.Concurrency.TaskObservationOptions)} }},System.Reactive.Concurrency.TaskObservationOptions)} }},System.Reactive.Concurrency.IScheduler)} }},System.Reactive.Concurrency.IScheduler)}

Qbservable.StartAsync(IQbservableProvider, Expression>) method

Defined in

Type: Qbservable Namespace: System.Reactive.Linq Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public static IQbservable<Unit> StartAsync(this IQbservableProvider provider, Expression<Func<Task>> actionAsync)
  • 2. public static IQbservable<Unit> StartAsync(this IQbservableProvider provider, Expression<Func<Task>> actionAsync, TaskObservationOptions options)
  • 3. public static IQbservable<Unit> StartAsync(this IQbservableProvider provider, Expression<Func<Task>> actionAsync, IScheduler scheduler)
  • 4. public static IQbservable<Unit> StartAsync(this IQbservableProvider provider, Expression<Func<CancellationToken, Task>> actionAsync)
  • 5. public static IQbservable<Unit> StartAsync(this IQbservableProvider provider, Expression<Func<CancellationToken, Task>> actionAsync, TaskObservationOptions options)
  • 6. public static IQbservable<Unit> StartAsync(this IQbservableProvider provider, Expression<Func<CancellationToken, Task>> actionAsync, IScheduler scheduler)
  • 7. public static IQbservable<TResult> StartAsync<TResult>(this IQbservableProvider provider, Expression<Func<Task<TResult>>> functionAsync)
  • 8. public static IQbservable<TResult> StartAsync<TResult>(this IQbservableProvider provider, Expression<Func<CancellationToken, Task<TResult>>> functionAsync)
  • 9. public static IQbservable<TResult> StartAsync<TResult>(this IQbservableProvider provider, Expression<Func<CancellationToken, Task<TResult>>> functionAsync, TaskObservationOptions options)
  • 10. public static IQbservable<TResult> StartAsync<TResult>(this IQbservableProvider provider, Expression<Func<Task<TResult>>> functionAsync, TaskObservationOptions options)
  • 11. public static IQbservable<TResult> StartAsync<TResult>(this IQbservableProvider provider, Expression<Func<CancellationToken, Task<TResult>>> functionAsync, IScheduler scheduler)
  • 12. public static IQbservable<TResult> StartAsync<TResult>(this IQbservableProvider provider, Expression<Func<Task<TResult>>> functionAsync, IScheduler scheduler)

1. Overload

public static IQbservable<Unit> StartAsync(this IQbservableProvider provider, Expression<Func<Task>> actionAsync)

Summary: Invokes the asynchronous action, surfacing the result through an observable sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
actionAsyncExpression>Asynchronous action to run.

Returns: IQbservable -- An observable sequence exposing a Unit value upon completion of the action, or an exception.

Remarks

-

The action is started immediately, not during the subscription of the resulting sequence.

-

Multiple subscriptions to the resulting sequence can observe the action's outcome.

Exceptions

TypeCondition
System.ArgumentNullExceptionactionAsync is null.

2. Overload

public static IQbservable<Unit> StartAsync(this IQbservableProvider provider, Expression<Func<Task>> actionAsync, TaskObservationOptions options)

Summary: Invokes the asynchronous action, surfacing the result through an observable sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
actionAsyncExpression>Asynchronous action to run.
options[TaskObservationOptions](#Controls how the tasks's progress is observed.

Returns: IQbservable -- An observable sequence exposing a Unit value upon completion of the action, or an exception.

Remarks

-

The action is started immediately, not during the subscription of the resulting sequence.

-

Multiple subscriptions to the resulting sequence can observe the action's outcome.

Exceptions

TypeCondition
System.ArgumentNullExceptionactionAsync is null.

3. Overload

public static IQbservable<Unit> StartAsync(this IQbservableProvider provider, Expression<Func<Task>> actionAsync, IScheduler scheduler)

Summary: Invokes the asynchronous action, surfacing the result through an observable sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
actionAsyncExpression>Asynchronous action to run.
scheduler[IScheduler](#Scheduler on which to notify observers.

Returns: IQbservable -- An observable sequence exposing a Unit value upon completion of the action, or an exception.

Remarks

-

The action is started immediately, not during the subscription of the resulting sequence.

-

Multiple subscriptions to the resulting sequence can observe the action's outcome.

Exceptions

TypeCondition
System.ArgumentNullExceptionactionAsync is null or scheduler is null.

4. Overload

public static IQbservable<Unit> StartAsync(this IQbservableProvider provider, Expression<Func<CancellationToken, Task>> actionAsync)

Summary: Invokes the asynchronous action, surfacing the result through an observable sequence. The CancellationToken is shared by all subscriptions on the resulting observable sequence. See the remarks section for more information.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
actionAsyncExpression>Asynchronous action to run.

Returns: IQbservable -- An observable sequence exposing a Unit value upon completion of the action, or an exception.

Remarks

-

The action is started immediately, not during the subscription of the resulting sequence.

-

Multiple subscriptions to the resulting sequence can observe the action's outcome.

-

If any subscription to the resulting sequence is disposed, the CancellationToken is set. The observer associated to the disposed subscription won't see the TaskCanceledException, but other observers will. You can protect against this using the Catch operator. Be careful when handing out the resulting sequence because of this behavior. The most common use is to have a single subscription to the resulting sequence, which controls the CancellationToken state. Alternatively, you can control subscription behavior using multicast operators.

Exceptions

TypeCondition
System.ArgumentNullExceptionactionAsync is null.

5. Overload

public static IQbservable<Unit> StartAsync(this IQbservableProvider provider, Expression<Func<CancellationToken, Task>> actionAsync, TaskObservationOptions options)

Summary: Invokes the asynchronous action, surfacing the result through an observable sequence. The CancellationToken is shared by all subscriptions on the resulting observable sequence. See the remarks section for more information.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
actionAsyncExpression>Asynchronous action to run.
options[TaskObservationOptions](#Controls how the tasks's progress is observed.

Returns: IQbservable -- An observable sequence exposing a Unit value upon completion of the action, or an exception.

Remarks

-

The action is started immediately, not during the subscription of the resulting sequence.

-

Multiple subscriptions to the resulting sequence can observe the action's outcome.

-

If any subscription to the resulting sequence is disposed, the CancellationToken is set. The observer associated to the disposed subscription won't see the TaskCanceledException, but other observers will. You can protect against this using the Catch operator. Be careful when handing out the resulting sequence because of this behavior. The most common use is to have a single subscription to the resulting sequence, which controls the CancellationToken state. Alternatively, you can control subscription behavior using multicast operators.

Exceptions

TypeCondition
System.ArgumentNullExceptionactionAsync is null.

6. Overload

public static IQbservable<Unit> StartAsync(this IQbservableProvider provider, Expression<Func<CancellationToken, Task>> actionAsync, IScheduler scheduler)

Summary: Invokes the asynchronous action, surfacing the result through an observable sequence. The CancellationToken is shared by all subscriptions on the resulting observable sequence. See the remarks section for more information.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
actionAsyncExpression>Asynchronous action to run.
scheduler[IScheduler](#Scheduler on which to notify observers.

Returns: IQbservable -- An observable sequence exposing a Unit value upon completion of the action, or an exception.

Remarks

-

The action is started immediately, not during the subscription of the resulting sequence.

-

Multiple subscriptions to the resulting sequence can observe the action's outcome.

-

If any subscription to the resulting sequence is disposed, the CancellationToken is set. The observer associated to the disposed subscription won't see the TaskCanceledException, but other observers will. You can protect against this using the Catch operator. Be careful when handing out the resulting sequence because of this behavior. The most common use is to have a single subscription to the resulting sequence, which controls the CancellationToken state. Alternatively, you can control subscription behavior using multicast operators.

Exceptions

TypeCondition
System.ArgumentNullExceptionactionAsync is null or scheduler is null.

7. Overload

public static IQbservable<TResult> StartAsync<TResult>(this IQbservableProvider provider, Expression<Func<Task<TResult>>> functionAsync)

Summary: Invokes the asynchronous function, surfacing the result through an observable sequence.

Type parameters

NameDescription
TResultThe type of the result returned by the asynchronous function.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
functionAsyncExpression>>Asynchronous function to run.

Returns: IQbservable -- An observable sequence exposing the function's result value, or an exception.

Remarks

-

The function is started immediately, not during the subscription of the resulting sequence.

-

Multiple subscriptions to the resulting sequence can observe the function's result.

Exceptions

TypeCondition
System.ArgumentNullExceptionfunctionAsync is null.

8. Overload

public static IQbservable<TResult> StartAsync<TResult>(this IQbservableProvider provider, Expression<Func<CancellationToken, Task<TResult>>> functionAsync)

Summary: Invokes the asynchronous function, surfacing the result through an observable sequence. The CancellationToken is shared by all subscriptions on the resulting observable sequence. See the remarks section for more information.

Type parameters

NameDescription
TResultThe type of the result returned by the asynchronous function.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
functionAsyncExpression>>Asynchronous function to run.

Returns: IQbservable -- An observable sequence exposing the function's result value, or an exception.

Remarks

-

The function is started immediately, not during the subscription of the resulting sequence.

-

Multiple subscriptions to the resulting sequence can observe the function's result.

-

If any subscription to the resulting sequence is disposed, the CancellationToken is set. The observer associated to the disposed subscription won't see the TaskCanceledException, but other observers will. You can protect against this using the Catch operator. Be careful when handing out the resulting sequence because of this behavior. The most common use is to have a single subscription to the resulting sequence, which controls the CancellationToken state. Alternatively, you can control subscription behavior using multicast operators.

Exceptions

TypeCondition
System.ArgumentNullExceptionfunctionAsync is null.

9. Overload

public static IQbservable<TResult> StartAsync<TResult>(this IQbservableProvider provider, Expression<Func<CancellationToken, Task<TResult>>> functionAsync, TaskObservationOptions options)

Summary: Invokes the asynchronous function, surfacing the result through an observable sequence. The CancellationToken is shared by all subscriptions on the resulting observable sequence. See the remarks section for more information.

Type parameters

NameDescription
TResultThe type of the result returned by the asynchronous function.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
functionAsyncExpression>>Asynchronous function to run.
options[TaskObservationOptions](#Controls how the tasks's progress is observed.

Returns: IQbservable -- An observable sequence exposing the function's result value, or an exception.

Remarks

-

The function is started immediately, not during the subscription of the resulting sequence.

-

Multiple subscriptions to the resulting sequence can observe the function's result.

-

If any subscription to the resulting sequence is disposed, the CancellationToken is set. The observer associated to the disposed subscription won't see the TaskCanceledException, but other observers will. You can protect against this using the Catch operator. Be careful when handing out the resulting sequence because of this behavior. The most common use is to have a single subscription to the resulting sequence, which controls the CancellationToken state. Alternatively, you can control subscription behavior using multicast operators.

Exceptions

TypeCondition
System.ArgumentNullExceptionfunctionAsync is null.

10. Overload

public static IQbservable<TResult> StartAsync<TResult>(this IQbservableProvider provider, Expression<Func<Task<TResult>>> functionAsync, TaskObservationOptions options)

Summary: Invokes the asynchronous function, surfacing the result through an observable sequence.

Type parameters

NameDescription
TResultThe type of the result returned by the asynchronous function.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
functionAsyncExpression>>Asynchronous function to run.
options[TaskObservationOptions](#Controls how the tasks's progress is observed.

Returns: IQbservable -- An observable sequence exposing the function's result value, or an exception.

Remarks

-

The function is started immediately, not during the subscription of the resulting sequence.

-

Multiple subscriptions to the resulting sequence can observe the function's result.

Exceptions

TypeCondition
System.ArgumentNullExceptionfunctionAsync is null.

11. Overload

public static IQbservable<TResult> StartAsync<TResult>(this IQbservableProvider provider, Expression<Func<CancellationToken, Task<TResult>>> functionAsync, IScheduler scheduler)

Summary: Invokes the asynchronous function, surfacing the result through an observable sequence. The CancellationToken is shared by all subscriptions on the resulting observable sequence. See the remarks section for more information.

Type parameters

NameDescription
TResultThe type of the result returned by the asynchronous function.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
functionAsyncExpression>>Asynchronous function to run.
scheduler[IScheduler](#Scheduler on which to notify observers.

Returns: IQbservable -- An observable sequence exposing the function's result value, or an exception.

Remarks

-

The function is started immediately, not during the subscription of the resulting sequence.

-

Multiple subscriptions to the resulting sequence can observe the function's result.

-

If any subscription to the resulting sequence is disposed, the CancellationToken is set. The observer associated to the disposed subscription won't see the TaskCanceledException, but other observers will. You can protect against this using the Catch operator. Be careful when handing out the resulting sequence because of this behavior. The most common use is to have a single subscription to the resulting sequence, which controls the CancellationToken state. Alternatively, you can control subscription behavior using multicast operators.

Exceptions

TypeCondition
System.ArgumentNullExceptionfunctionAsync is null or scheduler is null.

12. Overload

public static IQbservable<TResult> StartAsync<TResult>(this IQbservableProvider provider, Expression<Func<Task<TResult>>> functionAsync, IScheduler scheduler)

Summary: Invokes the asynchronous function, surfacing the result through an observable sequence.

Type parameters

NameDescription
TResultThe type of the result returned by the asynchronous function.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
functionAsyncExpression>>Asynchronous function to run.
scheduler[IScheduler](#Scheduler on which to notify observers.

Returns: IQbservable -- An observable sequence exposing the function's result value, or an exception.

Remarks

-

The function is started immediately, not during the subscription of the resulting sequence.

-

Multiple subscriptions to the resulting sequence can observe the function's result.

Exceptions

TypeCondition
System.ArgumentNullExceptionfunctionAsync is null or scheduler is null.