Table of Contents

Interface IFeatureToggleService

Namespace
Quilt4Net.Toolkit.Framework
Assembly
Quilt4Net.Toolkit.dll

Minimal feature-toggle accessor: resolves a boolean flag from Quilt4Net remote configuration.

public interface IFeatureToggleService

Methods

GetToggleAsync(string, bool, TimeSpan?, string)

Resolves a boolean feature toggle. The value is cached locally with stale-while-revalidate and falls back to fallback when the key is unknown or the server is unreachable.

ValueTask<bool> GetToggleAsync(string key, bool fallback = false, TimeSpan? ttl = null, string application = "")

Parameters

key string

Toggle key.

fallback bool

Value returned when the key is unknown or the server is unreachable.

ttl TimeSpan?

Optional client-requested cache lifetime. When null, the team/server-configured default applies.

application string

Which application's toggle to read: empty string (the default) reads the shared, cross-application value; null reads the configured application's value (or the entry assembly name); a specific name reads that named application's value.

Returns

ValueTask<bool>