small startup performance optimization

This commit is contained in:
RaidMax
2022-01-28 09:35:01 -06:00
parent 73036dc1c7
commit f4b160b735
28 changed files with 112 additions and 67 deletions

View File

@ -5,4 +5,4 @@
string Name();
IBaseConfiguration Generate();
}
}
}

View File

@ -6,8 +6,8 @@ namespace SharedLibraryCore.Interfaces
{
string FileName { get; }
Task Save();
void Build();
Task BuildAsync();
T Configuration();
void Set(T config);
}
}
}

View File

@ -1,17 +1,27 @@
namespace SharedLibraryCore.Interfaces
using System.Threading.Tasks;
namespace SharedLibraryCore.Interfaces
{
/// <summary>
/// defines the capabilities of the configuration handler factory
/// used to generate new instance of configuration handlers
/// defines the capabilities of the configuration handler factory
/// used to generate new instance of configuration handlers
/// </summary>
public interface IConfigurationHandlerFactory
{
/// <summary>
/// generates a new configuration handler
/// 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;
/// <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;
}
}
}