Merge branch 'develop'

This commit is contained in:
Samuele E. Locatelli
2020-10-03 15:58:09 +02:00
4 changed files with 1330 additions and 1327 deletions
Vendored
+1 -1
View File
@@ -7,7 +7,7 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=743']) {
withEnv(['NEXT_BUILD_NUMBER=744']) {
// env.versionNumber = VersionNumber(versionNumberString : '5.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '5.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.versionNumberBeta = VersionNumber(versionNumberString : '5.0.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
+1 -5
View File
@@ -21,7 +21,7 @@ namespace SteamWare.Logger
static Logging()
{
#if DEBUG
#if false
// Setup the logging view for Sentinel - http://sentinel.codeplex.com
var sentinalTarget = new NLogViewerTarget()
{
@@ -42,8 +42,6 @@ namespace SteamWare.Logger
#endregion Public Constructors
#region Public Properties
/// <summary>
@@ -53,8 +51,6 @@ namespace SteamWare.Logger
#endregion Public Properties
#region Public Methods
public static void LogError(string message)
+1221 -1210
View File
File diff suppressed because it is too large Load Diff
+107 -111
View File
@@ -43,8 +43,6 @@ namespace SteamWare
#endregion Public Fields
#region Protected Constructors
/// <summary>
@@ -62,8 +60,6 @@ namespace SteamWare
#endregion Protected Constructors
#region Protected Properties
/// <summary>
@@ -185,80 +181,6 @@ namespace SteamWare
}
}
/// <summary>
/// carica in ram oggetto AppConf
/// </summary>
/// <returns></returns>
protected Dictionary<string, string> ricaricaAppConf()
{
Dictionary<string, string> answ = new Dictionary<string, string>();
// istanzio un NUOVO oggetto x evitare problemi init contestuali
memLayer nML = new memLayer();
var tabDati = nML.taConfig.GetData();
// carico
foreach (DS_Utility.ConfigRow riga in tabDati)
{
try
{
answ.Add(riga.chiave, riga.valore);
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore procedura ricaricaAppConf per kvp: {0} / {1}{2}{3}", riga.chiave, riga.valore, Environment.NewLine, exc), tipoLog.EXCEPTION);
}
}
// log ricarica
logger.lg.scriviLog(string.Format("Effettuata procedura ricaricaAppConf per {0} records", answ.Count), tipoLog.INFO);
return answ;
}
/// <summary>
/// avvio oggetto AppConf in ram
/// </summary>
protected void startupAppConf()
{
// SOLO SE ho la chiave x abilitare config su DB...
if (confReadString("DbConfConnectionString") != "")
{
try
{
if (redKeyPresent(ACBH))
{
AppConf = new Dictionary<string, string>();
foreach (var item in redGetHash(ACBH))
{
if (AppConf.ContainsKey(item.Key))
{
AppConf[item.Key] = item.Value;
}
else
{
AppConf.Add(item.Key, item.Value);
}
}
}
else
{
AppConf = ricaricaAppConf();
KeyValuePair<string, string>[] valori = new KeyValuePair<string, string>[AppConf.Count];
int i = 0;
foreach (var item in AppConf)
{
valori[i] = new KeyValuePair<string, string>(item.Key, item.Value);
i++;
}
// salvo in redis valori (con TTL)
redSaveHash(ACBH, valori, maxAgeAppConf);
logger.lg.scriviLog("Completato procedura startupAppConf ", tipoLog.INFO);
}
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore in startupAppConf:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
}
}
}
/// <summary>
/// Configurations da tabella DB Config (short form wrapper)
/// </summary>
@@ -379,6 +301,80 @@ namespace SteamWare
startupAppConf();
}
/// <summary>
/// carica in ram oggetto AppConf
/// </summary>
/// <returns></returns>
protected Dictionary<string, string> ricaricaAppConf()
{
Dictionary<string, string> answ = new Dictionary<string, string>();
// istanzio un NUOVO oggetto x evitare problemi init contestuali
memLayer nML = new memLayer();
var tabDati = nML.taConfig.GetData();
// carico
foreach (DS_Utility.ConfigRow riga in tabDati)
{
try
{
answ.Add(riga.chiave, riga.valore);
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore procedura ricaricaAppConf per kvp: {0} / {1}{2}{3}", riga.chiave, riga.valore, Environment.NewLine, exc), tipoLog.EXCEPTION);
}
}
// log ricarica
Logger.Logging.Instance.Info($"Effettuata procedura ricaricaAppConf per {answ.Count} records");
return answ;
}
/// <summary>
/// avvio oggetto AppConf in ram
/// </summary>
protected void startupAppConf()
{
// SOLO SE ho la chiave x abilitare config su DB...
if (confReadString("DbConfConnectionString") != "")
{
try
{
if (redKeyPresent(ACBH))
{
AppConf = new Dictionary<string, string>();
foreach (var item in redGetHash(ACBH))
{
if (AppConf.ContainsKey(item.Key))
{
AppConf[item.Key] = item.Value;
}
else
{
AppConf.Add(item.Key, item.Value);
}
}
}
else
{
AppConf = ricaricaAppConf();
KeyValuePair<string, string>[] valori = new KeyValuePair<string, string>[AppConf.Count];
int i = 0;
foreach (var item in AppConf)
{
valori[i] = new KeyValuePair<string, string>(item.Key, item.Value);
i++;
}
// salvo in redis valori (con TTL)
redSaveHash(ACBH, valori, maxAgeAppConf);
Logger.Logging.Instance.Info("Completato procedura startupAppConf");
}
}
catch (Exception exc)
{
Logger.Logging.Instance.Error($"Errore in startupAppConf:{Environment.NewLine}{exc}");
}
}
}
#endregion area gestione config su DB
#region utility gestione conf settings
@@ -1424,11 +1420,6 @@ namespace SteamWare
ValDesc
}
/// <summary>
/// Oggetto currentDb locale
/// </summary>
private IDatabase _currDB { get; set; }
/// <summary>
/// Oggetto DB REDIS corrente
/// </summary>
@@ -1504,26 +1495,9 @@ namespace SteamWare
}
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP ASC
/// Oggetto currentDb locale
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKey(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return x.Key.CompareTo(y.Key);
}
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP DESC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKeyDesc(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return y.Key.CompareTo(x.Key);
}
private IDatabase _currDB { get; set; }
/// <summary>
/// Effettua comaprazione x VALORE in KVP ASC
@@ -1890,7 +1864,7 @@ namespace SteamWare
}
catch (Exception exc)
{
SteamWare.Logger.Logging.LogException(exc, Logger.Constants.ERROR_LEVEL.Error);
Logger.Logging.LogException(exc, Logger.Constants.ERROR_LEVEL.Error);
}
return answ;
}
@@ -2289,6 +2263,28 @@ namespace SteamWare
return answ;
}
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP ASC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKey(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return x.Key.CompareTo(y.Key);
}
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP DESC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKeyDesc(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return y.Key.CompareTo(x.Key);
}
#endregion gestione valori in RedisCache
#region URL corretti immagini
@@ -2329,14 +2325,6 @@ namespace SteamWare
}
}
/// <summary>
/// Init accesso MongoDb
/// </summary>
private void setupMongo()
{
currMongoClient = new MongoClient(mongoConnString);
}
/// <summary>
/// Restituisce oggetto DB richiesto
/// </summary>
@@ -2348,6 +2336,14 @@ namespace SteamWare
return answ;
}
/// <summary>
/// Init accesso MongoDb
/// </summary>
private void setupMongo()
{
currMongoClient = new MongoClient(mongoConnString);
}
#endregion gestione mongoDb
}
}