API Reference › Services
IPluginConfigurationService
InterfaceNamespace: SwiftlyS2.Shared.Services · Assembly: SwiftlyS2.CS2.dll
public interface IPluginConfigurationServiceProperties
Whether the base path exists in the file system.
bool BasePathExists { get; }Property Value
Get the configuration root.
IConfigurationManager Manager { get; }Property Value
Methods
Configure the internal configuration manager.
IPluginConfigurationService Configure(Action<IConfigurationBuilder> configure)Parameters
- configureAction<IConfigurationBuilder>The action to configure the configuration manager.
Get the path to the configuration file.
string GetConfigPath(string name)Parameters
- namestringThe name of the configuration file, including the extension.
Initialize the json configuration file with a class as template.
IPluginConfigurationService InitializeJsonWithModel<T>(string name, string sectionName) where T : class, new()Parameters
Returns
Initialize the TOML configuration file with a class as template.
IPluginConfigurationService InitializeTomlWithModel<T>(string name, string sectionName) where T : class, new()Parameters
Returns
Initialize the configuration file with a template. To use this, you must package a templates folder in the plugin, with the template file in it.
IPluginConfigurationService InitializeWithTemplate(string name, string templateName)Parameters
Returns