Table of Contents

Class AsyncContextMixins

Namespace
ReactiveUI.Extensions.Async
Assembly
ReactiveUI.Extensions.dll

Provides extension methods for comparing AsyncContext instances with the current async context.

public static class AsyncContextMixins
Inheritance
AsyncContextMixins

Methods

IsSameAsCurrentAsyncContext(AsyncContext)

Determines whether the specified AsyncContext represents the current asynchronous context.

public static bool IsSameAsCurrentAsyncContext(this AsyncContext @this)

Parameters

this AsyncContext

The AsyncContext instance to compare with the current context.

Returns

bool

true if the specified AsyncContext matches the current SynchronizationContext or TaskScheduler; otherwise, false.

Remarks

This method compares the SynchronizationContext or TaskScheduler of the provided AsyncContext with the current context to determine equivalence. Use this method to check if code is executing within the intended asynchronous environment.