Partilhar via


FeatureManager.IsEnabledAsync Method

Definition

Overloads

Name Description
IsEnabledAsync(String)

Checks whether a given feature is enabled.

IsEnabledAsync(String, CancellationToken)

Checks whether a given feature is enabled.

IsEnabledAsync<TContext>(String, TContext)

Checks whether a given feature is enabled.

IsEnabledAsync<TContext>(String, TContext, CancellationToken)

Checks whether a given feature is enabled.

IsEnabledAsync(String)

Checks whether a given feature is enabled.

public System.Threading.Tasks.Task<bool> IsEnabledAsync(string feature);
abstract member IsEnabledAsync : string -> System.Threading.Tasks.Task<bool>
override this.IsEnabledAsync : string -> System.Threading.Tasks.Task<bool>
Public Function IsEnabledAsync (feature As String) As Task(Of Boolean)

Parameters

feature
String

The name of the feature to check.

Returns

True if the feature is enabled, otherwise false.

Implements

Applies to

IsEnabledAsync(String, CancellationToken)

Checks whether a given feature is enabled.

public System.Threading.Tasks.ValueTask<bool> IsEnabledAsync(string feature, System.Threading.CancellationToken cancellationToken = default);
abstract member IsEnabledAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<bool>
override this.IsEnabledAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<bool>
Public Function IsEnabledAsync (feature As String, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Boolean)

Parameters

feature
String

The name of the feature to check.

cancellationToken
CancellationToken

The cancellation token to cancel the operation.

Returns

True if the feature is enabled, otherwise false.

Implements

Applies to

IsEnabledAsync<TContext>(String, TContext)

Checks whether a given feature is enabled.

public System.Threading.Tasks.Task<bool> IsEnabledAsync<TContext>(string feature, TContext appContext);
abstract member IsEnabledAsync : string * 'Context -> System.Threading.Tasks.Task<bool>
override this.IsEnabledAsync : string * 'Context -> System.Threading.Tasks.Task<bool>
Public Function IsEnabledAsync(Of TContext) (feature As String, appContext As TContext) As Task(Of Boolean)

Type Parameters

TContext

Parameters

feature
String

The name of the feature to check.

appContext
TContext

A context that provides information to evaluate whether a feature should be on or off.

Returns

True if the feature is enabled, otherwise false.

Implements

Applies to

IsEnabledAsync<TContext>(String, TContext, CancellationToken)

Checks whether a given feature is enabled.

public System.Threading.Tasks.ValueTask<bool> IsEnabledAsync<TContext>(string feature, TContext appContext, System.Threading.CancellationToken cancellationToken = default);
abstract member IsEnabledAsync : string * 'Context * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<bool>
override this.IsEnabledAsync : string * 'Context * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<bool>
Public Function IsEnabledAsync(Of TContext) (feature As String, appContext As TContext, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Boolean)

Type Parameters

TContext

Parameters

feature
String

The name of the feature to check.

appContext
TContext

A context that provides information to evaluate whether a feature should be on or off.

cancellationToken
CancellationToken

The cancellation token to cancel the operation.

Returns

True if the feature is enabled, otherwise false.

Implements

Applies to