Table of Contents

Interface IRemoteConfigurationService

Namespace
Quilt4Net.Toolkit.Features.FeatureToggle
Assembly
Quilt4Net.Toolkit.dll

Reads — and, for admin scenarios, writes — remote configuration values and feature toggles served by Quilt4Net. Read results are cached locally with stale-while-revalidate; a failed server call falls back to the last known value or the supplied fallback, so reads never throw.

public interface IRemoteConfigurationService

Methods

DeleteAsync(string, string, string, string)

Deletes a configuration entry. Requires a server API key carrying the config:write scope.

Task DeleteAsync(string key, string application, string environment, string instance)

Parameters

key string

Configuration key.

application string

Owning application; pass an empty string for a shared entry.

environment string

Owning environment.

instance string

Owning instance, or null.

Returns

Task

GetAsync()

Lists every configuration entry (feature toggles and configuration values) the calling API key can read on the team — across all applications and environments. Intended for admin / overview UIs (e.g. RemoteConfigurationAdmin); for per-app value lookup use GetAsync<T>(string, T, TimeSpan?, string) instead.

Task<ConfigurationResponse[]> GetAsync()

Returns

Task<ConfigurationResponse[]>

GetAsync<T>(string, T, TimeSpan?, string)

Resolves a typed remote configuration value.

ValueTask<T> GetAsync<T>(string key, T fallback = default, TimeSpan? ttl = null, string application = "")

Parameters

key string

Configuration key.

fallback T

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 value to read:

  • Empty string (the default) — the shared, cross-application value.
  • null — the value for the configured Application, or the entry assembly name when that is unset (i.e. "this application").
  • A specific name — the value for that named application.

Returns

ValueTask<T>

Type Parameters

T

Value type. Must be convertible from its string representation (e.g. bool, int, string).

GetToggleAsync(string, bool, TimeSpan?, string)

Resolves a boolean feature toggle — shorthand for GetAsync<T>(string, T, TimeSpan?, string) with T = bool.

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 value; null reads the configured application's value (or the entry assembly name); a specific name reads that application's value. See GetAsync<T>(string, T, TimeSpan?, string) for details.

Returns

ValueTask<bool>

SetAsync(string, string, string, string, string)

Creates or updates a configuration value. Requires a server API key carrying the config:write scope.

Task SetAsync(string key, string application, string environment, string instance, string value)

Parameters

key string

Configuration key.

application string

Owning application; pass an empty string for a shared entry.

environment string

Owning environment.

instance string

Owning instance, or null.

value string

New value (stored as its string representation).

Returns

Task