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
Use GetAssetLink<TAsset>(IConfiguration, string) or GetValue<T>(IConfiguration, string) with IAssetLink<TAsset> to get assets.
Constructors
AssetConfiguration(WarfareModule)
public AssetConfiguration(WarfareModule module)
Parameters
moduleWarfareModule
Properties
FilePath
public string FilePath { get; }
Property Value
this[string]
Gets or sets a configuration value.
public string? this[string key] { get; set; }
Parameters
keystringThe configuration key.
Property Value
- string
The configuration value.
UnderlyingConfiguration
public IConfiguration UnderlyingConfiguration { get; }
Property Value
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
GetSection(string)
Gets a configuration sub-section with the specified key.
public IConfigurationSection GetSection(string key)
Parameters
keystringThe key of the configuration section.
Returns
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