Show / Hide Table of Contents

Class PluginConfigurations

Configuration to store settings for a dalamud plugin.

Inheritance
System.Object
PluginConfigurations
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Dalamud.Configuration
Assembly: Dalamud.dll
Syntax
public sealed class PluginConfigurations

Constructors

| Improve this Doc View Source

PluginConfigurations(String)

Initializes a new instance of the PluginConfigurations class.

Declaration
public PluginConfigurations(string storageFolder)
Parameters
Type Name Description
System.String storageFolder

Directory for storage of plugin configuration files.

Methods

| Improve this Doc View Source

Delete(String)

Delete the configuration file and folder for the specified plugin. This will throw an System.IO.IOException if the plugin did not correctly close its handles.

Declaration
public void Delete(string pluginName)
Parameters
Type Name Description
System.String pluginName

The name of the plugin.

| Improve this Doc View Source

GetConfigFile(String)

Get FileInfo to plugin config file.

Declaration
public FileInfo GetConfigFile(string pluginName)
Parameters
Type Name Description
System.String pluginName

InternalName of the plugin.

Returns
Type Description
System.IO.FileInfo

FileInfo of the config file.

| Improve this Doc View Source

GetDirectory(String)

Get plugin directory.

Declaration
public string GetDirectory(string pluginName)
Parameters
Type Name Description
System.String pluginName

Plugin name.

Returns
Type Description
System.String

Plugin directory path.

| Improve this Doc View Source

Load(String)

Load plugin configuration.

Declaration
public IPluginConfiguration Load(string pluginName)
Parameters
Type Name Description
System.String pluginName

Plugin name.

Returns
Type Description
IPluginConfiguration

Plugin configuration.

| Improve this Doc View Source

LoadForType<T>(String)

Load Plugin configuration. Parameterized deserialization. Currently this is called via reflection from DalamudPluginInterface.GetPluginConfig(). Eventually there may be an additional pluginInterface method that can call this directly without reflection - for now this is in support of the existing plugin api.

Declaration
public T LoadForType<T>(string pluginName)
    where T : IPluginConfiguration
Parameters
Type Name Description
System.String pluginName

Plugin Name.

Returns
Type Description
T

Plugin Configuration.

Type Parameters
Name Description
T

Configuration Type.

| Improve this Doc View Source

Save(IPluginConfiguration, String)

Save/Load plugin configuration. NOTE: Save/Load are still using Type information for now, despite LoadForType superseding Load and not requiring or using it. It might be worth removing the Type info from Save, to strip it from all future saved configs, and then Load() can probably be removed entirely.

Declaration
public void Save(IPluginConfiguration config, string pluginName)
Parameters
Type Name Description
IPluginConfiguration config

Plugin configuration.

System.String pluginName

Plugin name.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX