2022-01-28 10:35:01 -05:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace SharedLibraryCore.Interfaces
|
2020-02-11 17:44:06 -05:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2022-01-28 10:35:01 -05:00
|
|
|
|
/// defines the capabilities of the configuration handler factory
|
|
|
|
|
/// used to generate new instance of configuration handlers
|
2020-02-11 17:44:06 -05:00
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IConfigurationHandlerFactory
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2022-01-28 10:35:01 -05:00
|
|
|
|
/// generates a new configuration handler
|
2020-02-11 17:44:06 -05:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="T">base configuration type</typeparam>
|
|
|
|
|
/// <param name="name">file name of configuration</param>
|
|
|
|
|
/// <returns>new configuration handler instance</returns>
|
|
|
|
|
IConfigurationHandler<T> GetConfigurationHandler<T>(string name) where T : IBaseConfiguration;
|
2022-01-28 10:35:01 -05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// generates a new configuration handler and builds the configuration automatically
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="T">base configuration type</typeparam>
|
|
|
|
|
/// <param name="name">file name of configuration</param>
|
|
|
|
|
/// <returns>new configuration handler instance</returns>
|
|
|
|
|
Task<IConfigurationHandler<T>> GetConfigurationHandlerAsync<T>(string name) where T : IBaseConfiguration;
|
2020-02-11 17:44:06 -05:00
|
|
|
|
}
|
2022-01-28 10:35:01 -05:00
|
|
|
|
}
|