Reorg codice
This commit is contained in:
+63
-34
@@ -15,6 +15,8 @@ namespace MP.Land.Data
|
||||
{
|
||||
public class SyncService
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Init classe
|
||||
/// </summary>
|
||||
@@ -26,13 +28,26 @@ namespace MP.Land.Data
|
||||
_configuration = configuration;
|
||||
}
|
||||
|
||||
private static ILogger<LicenseService> _logger { get; set; } = null!;
|
||||
private static IConfiguration? _configuration;
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public List<AnagKeyValueModel> AKVList { get; set; } = new List<AnagKeyValueModel>();
|
||||
public string Applicazione { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// URL dell'API x chiamate gestione licenze
|
||||
/// Codice cliente/installazione
|
||||
/// </summary>
|
||||
private static string apiUrl = "https://liman.egalware.com/ELM.API/";
|
||||
public string Installazione { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Master key licenza principale
|
||||
/// </summary>
|
||||
public string MasterKey { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Stato server gestione licenze
|
||||
@@ -55,30 +70,7 @@ namespace MP.Land.Data
|
||||
}
|
||||
return await Task.FromResult(answ);
|
||||
}
|
||||
public List<AnagKeyValueModel> AKVList { get; set; } = new List<AnagKeyValueModel>();
|
||||
public string Applicazione { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Codice cliente/installazione
|
||||
/// </summary>
|
||||
public string Installazione { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Cerca di recuperare valore string da elenco AKV
|
||||
/// </summary>
|
||||
/// <param name="varReq">Chiave AKV richiesta</param>
|
||||
/// <returns></returns>
|
||||
protected string getAVKStr(string varReq)
|
||||
{
|
||||
string answ = "";
|
||||
if (AKVList != null && AKVList.Count > 0)
|
||||
{
|
||||
var currRec = AKVList.Where(x => x.NomeVar == varReq).FirstOrDefault();
|
||||
if (currRec != null)
|
||||
{
|
||||
answ = $"{currRec.ValString}";
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Init della classe con variabili di base da Redis/DB
|
||||
/// </summary>
|
||||
@@ -92,11 +84,6 @@ namespace MP.Land.Data
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Master key licenza principale
|
||||
/// </summary>
|
||||
public string MasterKey { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Lista record AnagKeyVal
|
||||
/// </summary>
|
||||
@@ -159,5 +146,47 @@ namespace MP.Land.Data
|
||||
}
|
||||
return await Task.FromResult(answ);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Cerca di recuperare valore string da elenco AKV
|
||||
/// </summary>
|
||||
/// <param name="varReq">Chiave AKV richiesta</param>
|
||||
/// <returns></returns>
|
||||
protected string getAVKStr(string varReq)
|
||||
{
|
||||
string answ = "";
|
||||
if (AKVList != null && AKVList.Count > 0)
|
||||
{
|
||||
var currRec = AKVList.Where(x => x.NomeVar == varReq).FirstOrDefault();
|
||||
if (currRec != null)
|
||||
{
|
||||
answ = $"{currRec.ValString}";
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration? _configuration;
|
||||
|
||||
/// <summary>
|
||||
/// URL dell'API x chiamate gestione licenze
|
||||
/// </summary>
|
||||
private static string apiUrl = "https://liman.egalware.com/ELM.API/";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private static ILogger<LicenseService> _logger { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user