consolidate Infrastructure interface and implementation classes

This commit is contained in:
sbwalker
2025-08-13 14:44:42 -04:00
parent b7ff49bdb2
commit e900d2f35a
27 changed files with 125 additions and 187 deletions

View File

@ -1,9 +0,0 @@
using Oqtane.Models;
namespace Oqtane.Infrastructure
{
public interface IAliasAccessor
{
Alias Alias { get; }
}
}

View File

@ -1,23 +0,0 @@
using System.Collections.Generic;
using Microsoft.Extensions.Configuration;
namespace Oqtane.Infrastructure
{
public interface IConfigManager
{
public IConfigurationSection GetSection(string sectionKey);
public T GetSetting<T>(string settingKey, T defaultValue);
public T GetSetting<T>(string sectionKey, string settingKey, T defaultValue);
public Dictionary<string, string> GetSettings(string sectionKey);
void AddOrUpdateSetting<T>(string key, T value, bool reload);
void AddOrUpdateSetting<T>(string file, string key, T value, bool reload);
void RemoveSetting(string key, bool reload);
void RemoveSetting(string file, string key, bool reload);
void Reload();
public string GetConnectionString();
public string GetConnectionString(string name);
public bool IsInstalled();
public string GetInstallationId();
}
}

View File

@ -1,12 +0,0 @@
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Infrastructure
{
public interface IDatabaseManager
{
Installation IsInstalled();
Installation Install();
Installation Install(InstallConfig install);
}
}

View File

@ -1,13 +0,0 @@
using System.Threading.Tasks;
namespace Oqtane.Infrastructure
{
public interface IInstallationManager
{
void InstallPackages();
bool UninstallPackage(string PackageName);
int RegisterAssemblies();
Task UpgradeFramework(bool backup);
void RestartApplication();
}
}

View File

@ -1,9 +0,0 @@
namespace Oqtane.Infrastructure
{
public interface ILocalizationManager
{
string GetDefaultCulture();
string[] GetSupportedCultures();
string[] GetInstalledCultures();
}
}

View File

@ -1,16 +0,0 @@
using System;
using Oqtane.Enums;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Infrastructure
{
public interface ILogManager
{
void Log(LogLevel level, object @class, LogFunction function, string message, params object[] args);
void Log(LogLevel level, object @class, LogFunction function, Exception exception, string message, params object[] args);
void Log(int siteId, LogLevel level, object @class, LogFunction function, string message, params object[] args);
void Log(int siteId, LogLevel level, object @class, LogFunction function, Exception exception, string message, params object[] args);
void Log(Log log);
}
}

View File

@ -1,7 +0,0 @@
namespace Oqtane.Infrastructure
{
public interface IServerStateManager
{
ServerState GetServerState(string siteKey);
}
}

View File

@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using Oqtane.Models;
namespace Oqtane.Infrastructure
{
public interface ISyncManager
{
event EventHandler<SyncEvent> EntityChanged;
List<SyncEvent> GetSyncEvents(int tenantId, DateTime lastSyncDate);
void AddSyncEvent(Alias alias, string entityName, int entityId, string action);
void AddSyncEvent(int tenantId, int siteId, string entityName, int entityId, string action);
[Obsolete("AddSyncEvent(int tenantId, string entityName, int entityId, string action) is deprecated. Use AddSyncEvent(Alias alias, string entityName, int entityId, string action) instead.", false)]
void AddSyncEvent(int tenantId, string entityName, int entityId, string action);
}
}

View File

@ -1,13 +0,0 @@
using Oqtane.Models;
namespace Oqtane.Infrastructure
{
public interface ITenantManager
{
Alias GetAlias();
Tenant GetTenant();
void SetAlias(Alias alias);
void SetAlias(int tenantId, int siteId);
void SetTenant(int tenantId);
}
}

View File

@ -1,27 +0,0 @@
using System;
using System.Collections.Generic;
using Oqtane.Interfaces;
namespace Oqtane.Infrastructure.Interfaces
{
public interface ITokenReplace
{
void AddSource(ITokenSource source);
void AddSource(Func<IDictionary<string, object>> sourceFunc);
void AddSource(IDictionary<string, object> source);
void AddSource(string key, object value);
void AddSource(string name, ITokenSource source);
void AddSource(string name, Func<IDictionary<string, object>> sourceFunc);
void AddSource(string name, IDictionary<string, object> source);
void AddSource(string name, string key, object value);
string ReplaceTokens(string source);
}
}

View File

@ -1,9 +0,0 @@
using Oqtane.Models;
namespace Oqtane.Infrastructure
{
public interface IUpgradeManager
{
void Upgrade(Tenant tenant, string version);
}
}