consolidate Service interface and implementation classes

This commit is contained in:
sbwalker
2025-08-11 16:53:32 -04:00
parent b3f6194fda
commit 64b8b5d3c8
70 changed files with 1763 additions and 1996 deletions

View File

@ -3,10 +3,46 @@ using System.Threading.Tasks;
using System.Collections.Generic;
using Oqtane.Documentation;
using Oqtane.Shared;
using System.Net;
namespace Oqtane.Services
{
/// <summary>
/// Service to retrieve and update system information.
/// </summary>
public interface ISystemService
{
/// <summary>
/// returns a key-value dictionary with the current system configuration information
/// </summary>
/// <returns></returns>
Task<Dictionary<string, object>> GetSystemInfoAsync();
/// <summary>
/// returns a key-value dictionary with the current system information - "environment" or "configuration"
/// </summary>
/// <returns></returns>
Task<Dictionary<string, object>> GetSystemInfoAsync(string type);
/// <summary>
/// returns a config value
/// </summary>
/// <returns></returns>
Task<object> GetSystemInfoAsync(string settingKey, object defaultValue);
/// <summary>
/// Updates system information
/// </summary>
/// <param name="settings"></param>
/// <returns></returns>
Task UpdateSystemInfoAsync(Dictionary<string, object> settings);
/// <summary>
/// returns a key-value dictionary with default system icons
/// </summary>
/// <returns></returns>
Task<Dictionary<string, string>> GetIconsAsync();
}
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class SystemService : ServiceBase, ISystemService
{