Table of Contents

Struct WithRawResponseTask<T>

Namespace
Auth0.ManagementApi
Assembly
Auth0.ManagementApi.dll

A task-like type that wraps Task<WithRawResponse<T>> and provides dual-mode awaiting:

  • Direct await yields just T (zero-allocation path for common case)
  • .WithRawResponse() yields WithRawResponse<T> (when raw response metadata is needed)
public readonly struct WithRawResponseTask<T>

Type Parameters

T

The type of the parsed response data.

Inherited Members

Constructors

WithRawResponseTask(Task<WithRawResponse<T>>)

Creates a new WithRawResponseTask wrapping the given task.

public WithRawResponseTask(Task<WithRawResponse<T>> task)

Parameters

task Task<WithRawResponse<T>>

Methods

ConfigureAwait(bool)

Configures the awaiter to continue on the captured context or not.

public WithRawResponseTask<T>.ConfiguredTaskAwaitable ConfigureAwait(bool continueOnCapturedContext)

Parameters

continueOnCapturedContext bool

Returns

WithRawResponseTask<T>.ConfiguredTaskAwaitable

GetAwaiter()

Gets the custom awaiter that unwraps to just T when awaited.

public WithRawResponseTask<T>.Awaiter GetAwaiter()

Returns

WithRawResponseTask<T>.Awaiter

WithRawResponse()

Returns the underlying task that yields both the data and raw response metadata.

public Task<WithRawResponse<T>> WithRawResponse()

Returns

Task<WithRawResponse<T>>

Operators

implicit operator Task<T>(WithRawResponseTask<T>)

Implicitly converts WithRawResponseTask<T> to global::System.Threading.Tasks.Task<T> for backward compatibility. The resulting task will yield just the data when awaited.

public static implicit operator Task<T>(WithRawResponseTask<T> task)

Parameters

task WithRawResponseTask<T>

Returns

Task<T>