Skip to content

AtlasOptionExtensions

Namespace: Shadop.Archmage.Sdk

Extension methods for fluent configuration of AtlasOptions using the builder pattern.

public static class AtlasOptionExtensions

Inheritance ObjectAtlasOptionExtensions

Remarks:

All methods return the AtlasOptions instance to enable method chaining.

Sets custom logger (defaults to console).

public static AtlasOptions WithLogger(AtlasOptions opts, IAtlasLogger logger)

opts AtlasOptions

logger IAtlasLogger

AtlasOptions

ArgumentNullException
Thrown if logger is null.

Sets custom filesystem (in-memory, embedded, virtual, etc. — does not affect override sources).

public static AtlasOptions WithFS(AtlasOptions opts, IFS fs)

opts AtlasOptions

fs IFS

AtlasOptions

ArgumentNullException
Thrown if fs is null.

Registers callback to modify atlas.json after loading.

public static AtlasOptions WithAtlasModifier(AtlasOptions opts, Action<AtlasJson> modifier)

opts AtlasOptions

modifier Action

AtlasOptions

ArgumentNullException
Thrown if modifier is null.

Specifies whitelist (if set, blacklist ignored; loads only whitelisted items).

public static AtlasOptions WithWhitelist(AtlasOptions opts, IEnumerable<string> whitelist)

opts AtlasOptions

whitelist IEnumerable

AtlasOptions

ArgumentNullException
Thrown if whitelist is null.

Specifies blacklist (ignored if whitelist present; skips blacklisted items).

public static AtlasOptions WithBlacklist(AtlasOptions opts, IEnumerable<string> blacklist)

opts AtlasOptions

blacklist IEnumerable

AtlasOptions

ArgumentNullException
Thrown if blacklist is null.

Selects the variant to load for the item identified by key (a variant-mapped item that is not given a variant falls back to “/”).

public static AtlasOptions WithVariant(AtlasOptions opts, string key, string variant)

opts AtlasOptions

key String

variant String

AtlasOptions

ArgumentNullException
Thrown if key or variant is null.

Adds directory as override source (processed in order; each can override previous).

public static AtlasOptions WithOverrideRoot(AtlasOptions opts, string rootPath)

opts AtlasOptions

rootPath String

AtlasOptions

ArgumentException
Thrown if rootPath is null or whitespace.

Adds custom filesystem as override source (embedded, network, in-memory, etc.). When rootPath is specified, override files are resolved relative to that path within the filesystem.

public static AtlasOptions WithOverrideFS(AtlasOptions opts, IFS fs, string rootPath)

opts AtlasOptions

fs IFS

rootPath String

AtlasOptions

ArgumentNullException
Thrown if fs is null.

WithLoadStrategy(AtlasOptions, AtlasLoadStrategy)

Section titled “WithLoadStrategy(AtlasOptions, AtlasLoadStrategy)”

Sets custom load strategy for parallel/cached/conditional loading (default is sequential).

public static AtlasOptions WithLoadStrategy(AtlasOptions opts, AtlasLoadStrategy strategy)

opts AtlasOptions

strategy AtlasLoadStrategy

AtlasOptions

ArgumentNullException
Thrown if strategy is null.

WithAsyncLoadStrategy(AtlasOptions, AtlasAsyncLoadStrategy)

Section titled “WithAsyncLoadStrategy(AtlasOptions, AtlasAsyncLoadStrategy)”

Sets custom async load strategy for parallel/cached/conditional loading (default is sequential).

public static AtlasOptions WithAsyncLoadStrategy(AtlasOptions opts, AtlasAsyncLoadStrategy strategy)

opts AtlasOptions

strategy AtlasAsyncLoadStrategy

AtlasOptions

ArgumentNullException
Thrown if strategy is null.

WithJsonSettings(AtlasOptions, JsonSerializerSettings)

Section titled “WithJsonSettings(AtlasOptions, JsonSerializerSettings)”

Sets custom JSON settings.

public static AtlasOptions WithJsonSettings(AtlasOptions opts, JsonSerializerSettings settings)

opts AtlasOptions

settings JsonSerializerSettings

AtlasOptions

ArgumentNullException
Thrown if settings is null.