AtlasOptionExtensions
Namespace: Shadop.Archmage.Sdk
Extension methods for fluent configuration of AtlasOptions using the builder pattern.
public static class AtlasOptionExtensionsInheritance Object → AtlasOptionExtensions
Remarks:
All methods return the AtlasOptions instance to enable method chaining.
Methods
Section titled “Methods”WithLogger(AtlasOptions, IAtlasLogger)
Section titled “WithLogger(AtlasOptions, IAtlasLogger)”Sets custom logger (defaults to console).
public static AtlasOptions WithLogger(AtlasOptions opts, IAtlasLogger logger)Parameters
Section titled “Parameters”opts AtlasOptions
logger IAtlasLogger
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”ArgumentNullException
Thrown if logger is null.
WithFS(AtlasOptions, IFS)
Section titled “WithFS(AtlasOptions, IFS)”Sets custom filesystem (in-memory, embedded, virtual, etc.).
public static AtlasOptions WithFS(AtlasOptions opts, IFS fs)Parameters
Section titled “Parameters”opts AtlasOptions
fs IFS
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”ArgumentNullException
Thrown if fs is null.
WithAtlasModifier(AtlasOptions, Action)
Section titled “WithAtlasModifier(AtlasOptions, Action)”Registers callback to modify atlas.json after loading.
public static AtlasOptions WithAtlasModifier(AtlasOptions opts, Action<AtlasJson> modifier)Parameters
Section titled “Parameters”opts AtlasOptions
modifier Action
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”ArgumentNullException
Thrown if modifier is null.
WithWhitelist(AtlasOptions, IEnumerable)
Section titled “WithWhitelist(AtlasOptions, IEnumerable)”Specifies whitelist (if set, blacklist ignored; loads only whitelisted items).
public static AtlasOptions WithWhitelist(AtlasOptions opts, IEnumerable<string> whitelist)Parameters
Section titled “Parameters”opts AtlasOptions
whitelist IEnumerable
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”ArgumentNullException
Thrown if whitelist is null.
WithBlacklist(AtlasOptions, IEnumerable)
Section titled “WithBlacklist(AtlasOptions, IEnumerable)”Specifies blacklist (ignored if whitelist present; skips blacklisted items).
public static AtlasOptions WithBlacklist(AtlasOptions opts, IEnumerable<string> blacklist)Parameters
Section titled “Parameters”opts AtlasOptions
blacklist IEnumerable
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”ArgumentNullException
Thrown if blacklist is null.
WithVariant(AtlasOptions, String, String)
Section titled “WithVariant(AtlasOptions, String, String)”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)Parameters
Section titled “Parameters”opts AtlasOptions
key String
variant String
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”ArgumentNullException
Thrown if key or variant is null.
WithOverrideRoot(AtlasOptions, String)
Section titled “WithOverrideRoot(AtlasOptions, String)”Adds directory as override source (processed in order; each can override previous).
public static AtlasOptions WithOverrideRoot(AtlasOptions opts, string rootPath)Parameters
Section titled “Parameters”opts AtlasOptions
rootPath String
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”ArgumentException
Thrown if rootPath is null or whitespace.
WithOverrideFS(AtlasOptions, IFS, String)
Section titled “WithOverrideFS(AtlasOptions, IFS, String)”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)Parameters
Section titled “Parameters”opts AtlasOptions
fs IFS
rootPath String
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”ArgumentNullException
Thrown if fs is null.
WithMaxConcurrency(AtlasOptions, Int32)
Section titled “WithMaxConcurrency(AtlasOptions, Int32)”Sets the maximum number of atlas items that can be loaded concurrently (default: 32). This limits the number of open files, the memory held by file contents, and the amount of deserialization work queued on the thread pool.
public static AtlasOptions WithMaxConcurrency(AtlasOptions opts, int n)Parameters
Section titled “Parameters”opts AtlasOptions
n Int32
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”ArgumentOutOfRangeException
Thrown if n is less than 1.
WithMainThreadParsing(AtlasOptions)
Section titled “WithMainThreadParsing(AtlasOptions)”Parses atlas items on the main thread and does not use the thread pool. Use this where the thread pool is not available. Unity WebGL builds always parse this way.
public static AtlasOptions WithMainThreadParsing(AtlasOptions opts)Parameters
Section titled “Parameters”opts AtlasOptions
Returns
Section titled “Returns”WithJsonSettings(AtlasOptions, JsonSerializerSettings)
Section titled “WithJsonSettings(AtlasOptions, JsonSerializerSettings)”Sets custom JSON settings.
public static AtlasOptions WithJsonSettings(AtlasOptions opts, JsonSerializerSettings settings)Parameters
Section titled “Parameters”opts AtlasOptions
settings JsonSerializerSettings
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”ArgumentNullException
Thrown if settings is null.