IW4M-Admin/SharedLibraryCore/Interfaces/IConfigurationHandlerFactory.cs

28 lines
1.1 KiB
C#
Raw Normal View History

2022-01-28 10:35:01 -05:00
using System.Threading.Tasks;
namespace SharedLibraryCore.Interfaces
{
/// <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
/// </summary>
public interface IConfigurationHandlerFactory
{
/// <summary>
2022-01-28 10:35:01 -05:00
/// generates a new configuration handler
/// </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;
}
2022-01-28 10:35:01 -05:00
}