using System;
using System.Threading.Tasks;
using Kyoo.Models;
using Kyoo.Models.Exceptions;
namespace Kyoo.Controllers
{
///
/// A class to ease configuration management. This work WITH Microsoft's package, you can still use IOptions patterns
/// to access your options, this manager ease dynamic work and editing.
/// It works with .
///
public interface IConfigurationManager
{
///
/// Get the value of a setting using it's path.
///
/// The path of the resource (can be separated by ':' or '__')
/// No setting found at the given path.
/// The value of the settings (if it's a strongly typed one, the given type is instantiated
object GetValue(string path);
///
/// Get the value of a setting using it's path.
/// If your don't need a strongly typed value, see .
///
/// The path of the resource (can be separated by ':' or '__')
/// A type to strongly type your option.
/// If your type is not the same as the registered type
/// No setting found at the given path.
/// The value of the settings (if it's a strongly typed one, the given type is instantiated
T GetValue(string path);
///
/// Edit the value of a setting using it's path. Save it to the json file.
///
/// The path of the resource (can be separated by ':' or '__')
/// The new value of the resource
/// No setting found at the given path.
Task EditValue(string path, object value);
}
}