add ability to register for updates
This commit is contained in:
@ -4,6 +4,7 @@ using System.IO;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Infrastructure
|
||||
{
|
||||
@ -115,5 +116,31 @@ namespace Oqtane.Infrastructure
|
||||
{
|
||||
_config.Reload();
|
||||
}
|
||||
|
||||
public string GetConnectionString()
|
||||
{
|
||||
return _config.GetConnectionString(SettingKeys.ConnectionStringKey);
|
||||
}
|
||||
|
||||
public string GetConnectionString(string name)
|
||||
{
|
||||
return _config.GetConnectionString(name);
|
||||
}
|
||||
|
||||
public bool IsInstalled()
|
||||
{
|
||||
return !string.IsNullOrEmpty(GetConnectionString());
|
||||
}
|
||||
|
||||
public string GetInstallationId()
|
||||
{
|
||||
var installationid = GetSetting("InstallationId", "");
|
||||
if (installationid == "")
|
||||
{
|
||||
installationid = Guid.NewGuid().ToString();
|
||||
AddOrUpdateSetting("InstallationId", installationid, true);
|
||||
}
|
||||
return installationid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,5 +12,10 @@ namespace Oqtane.Infrastructure
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user