namespace TShockAPI.Configuration
{
///
/// Describes a generic configuration interface wrapping some settings
///
///
public interface IConfigFile
{
///
/// Settings managed by this config file
///
TSettings Settings { get; set; }
///
/// Reads settings from a given path
///
/// The path to the file containing the settings
///
/// Whether the settings object has any new fields in it, meaning that the configuration should be
/// overwritten.
///
/// Settings object
TSettings Read(string path, out bool incompleteSettings);
///
/// Reads settings from a given stream
///
/// The stream containing the settings
///
/// Whether the settings object has any new fields in it, meaning that the configuration should be
/// overwritten.
///
/// Settings object
TSettings Read(System.IO.Stream stream, out bool incompleteSettings);
///
/// Converts a json-formatted string into the settings object used by this configuration
///
/// Json string to parse
/// Whether or not the json string contained an incomplete set of settings
/// Settings object
TSettings ConvertJson(string json, out bool incompleteSettings);
///
/// Writes this configuration to a given path
///
/// File location the configuration will be written to
void Write(string path);
///
/// Writes this configuration to a stream
///
/// Stream the configuration will be written to
void Write(System.IO.Stream stream);
}
}