Table of Contents

Class AssetConfiguration

Namespace
Uncreated.Warfare.Configuration
Assembly
Uncreated.Warfare.dll

Home for storing asset GUIDs, etc.

public class AssetConfiguration : IConfiguration, IDisposable
Inheritance
AssetConfiguration
Implements
Inherited Members
Extension Methods

Remarks

Constructors

AssetConfiguration(WarfareModule)

public AssetConfiguration(WarfareModule module)

Parameters

module WarfareModule

Properties

FilePath

public string FilePath { get; }

Property Value

string

this[string]

Gets or sets a configuration value.

public string? this[string key] { get; set; }

Parameters

key string

The configuration key.

Property Value

string

The configuration value.

UnderlyingConfiguration

public IConfiguration UnderlyingConfiguration { get; }

Property Value

IConfiguration

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetChildren()

Gets the immediate descendant configuration sub-sections.

public IEnumerable<IConfigurationSection> GetChildren()

Returns

IEnumerable<IConfigurationSection>

The configuration sub-sections.

GetReloadToken()

Returns a IChangeToken that can be used to observe when this configuration is reloaded.

public IChangeToken GetReloadToken()

Returns

IChangeToken

A IChangeToken.

GetSection(string)

Gets a configuration sub-section with the specified key.

public IConfigurationSection GetSection(string key)

Parameters

key string

The key of the configuration section.

Returns

IConfigurationSection

The IConfigurationSection.

Remarks

This method will never return null. If no matching sub-section is found with the specified key, an empty IConfigurationSection will be returned.

Events

OnChange

public event Action<IConfiguration>? OnChange

Event Type

Action<IConfiguration>