diff --git a/Jenkinsfile b/Jenkinsfile
index d96b273..db575c7 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -7,7 +7,7 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
- withEnv(['NEXT_BUILD_NUMBER=728']) {
+ withEnv(['NEXT_BUILD_NUMBER=729']) {
// env.versionNumber = VersionNumber(versionNumberString : '4.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '4.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.versionNumberBeta = VersionNumber(versionNumberString : '4.0.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
diff --git a/SteamWare.IO/fileMover.cs b/SteamWare.IO/fileMover.cs
index d69d39e..48af3d4 100644
--- a/SteamWare.IO/fileMover.cs
+++ b/SteamWare.IO/fileMover.cs
@@ -845,6 +845,15 @@ namespace SteamWare.IO
setDirs(System.Web.HttpContext.Current.Server.MapPath(_path));
}
///
+ /// restituisce la stringa completa e corretta del filepath del server (anche con vDir)
+ ///
+ /// path relativo alla cartella iis dell'applicativo
+ /// path fisico tradotto
+ public static string getFilePath(string pathRel)
+ {
+ return System.Web.HttpContext.Current.Server.MapPath(pathRel);
+ }
+ ///
/// esegue un comando in shell
///
///
diff --git a/SteamWareLib/SteamWare.csproj b/SteamWareLib/SteamWare.csproj
index 5db60f0..d529e8f 100644
--- a/SteamWareLib/SteamWare.csproj
+++ b/SteamWareLib/SteamWare.csproj
@@ -251,6 +251,7 @@
True
+
ASPXCodeBehind
diff --git a/SteamWareLib/SteamwareStrings.cs b/SteamWareLib/SteamwareStrings.cs
new file mode 100644
index 0000000..3f7bc17
--- /dev/null
+++ b/SteamWareLib/SteamwareStrings.cs
@@ -0,0 +1,143 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SteamWare
+{
+ ///
+ /// Classe di metodi che estendono quelli base applicati alle string
+ ///
+ public class SteamwareStrings
+ {
+ ///
+ /// Trasforma in MAIUSCOLo il primo carattere della stringa
+ ///
+ /// stringa da processare
+ /// stringa processata
+ public static string firstToUpper(string _stringaIN)
+ {
+ string _stringaOUT = _stringaIN;
+ if (_stringaIN.Length > 1)
+ {
+ _stringaOUT = _stringaIN.Substring(0, 1).ToUpper() + _stringaIN.Substring(1, _stringaIN.Length - 1).ToLower();
+ }
+ return _stringaOUT;
+ }
+
+ ///
+ /// effettua escape di stringhe di ricerca di tipo filtro per apici e altri caratteri non ammessi
+ ///
+ ///
+ ///
+ public static string EscapeSqlLike(string s_)
+ {
+ StringBuilder sb = new StringBuilder(s_.Length);
+ for (int i = 0; i < s_.Length; i++)
+ {
+ char c = s_[i];
+ switch (c)
+ {
+ case ']':
+ case '[':
+ case '%':
+ case '*':
+ sb.Append("[").Append(c).Append("]");
+ break;
+ case '\'':
+ sb.Append("''");
+ break;
+ default:
+ sb.Append(c);
+ break;
+ }
+ }
+ return sb.ToString();
+ }
+ ///
+ /// restituisce una stringa uguale all'originale + terminazione newline
+ ///
+ ///
+ ///
+ public static string addLine(object s)
+ {
+ return string.Format("{0}{1}", s, Environment.NewLine);
+ }
+ ///
+ /// formatta un titolo
+ ///
+ /// Titolo da scrivere
+ /// carattere x padding titolo
+ /// larghezza caratteri (x pad)
+ ///
+ public static string charTitle(object title, char padChar, int repNum)
+ {
+ string answ = "";
+ answ += addLine(new string(padChar, repNum));
+ answ += addLine(string.Format("{0} {1}", padChar, title));
+ answ += addLine(new string(padChar, repNum));
+ return answ;
+ }
+ ///
+ /// formatta una riga di caratteri
+ ///
+ /// carattere da utilizzare
+ /// larghezza caratteri (x pad)
+ ///
+ public static string charLine(char padChar, int repNum)
+ {
+ string answ = "";
+ answ += addLine(new string(padChar, repNum));
+ return answ;
+ }
+ ///
+ /// genera stringhe pseudo-casuali
+ ///
+ ///
+ ///
+ public static string pseudoRandomString(int Lenght)
+ {
+ string answ = "";
+ var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+ var random = new Random();
+ answ = new string(
+ Enumerable.Repeat(chars, Lenght)
+ .Select(s => s[random.Next(s.Length)])
+ .ToArray());
+ return answ;
+ }
+
+ ///
+ /// limita una stringa al numero max di caratteri imposto
+ ///
+ ///
+ ///
+ ///
+ public static string limitString(string original, int maxChar)
+ {
+ string outString = original;
+ if (outString.Length > maxChar)
+ {
+ outString = string.Format("{0}...", original.Substring(0, maxChar - 3));
+ }
+ return outString;
+ }
+ ///
+ /// limita una stringa al numero max di caratteri imposto prendendo ANCHE ultimi
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string limitString(string original, int maxChar, int lastNumChar)
+ {
+ string outString = original;
+ if (outString.Length > maxChar)
+ {
+ outString = string.Format("{0}...{1}", original.Substring(0, maxChar - 3 - lastNumChar), original.Substring(outString.Length - lastNumChar));
+ }
+ return outString;
+ }
+ }
+}
diff --git a/SteamWareLib/dbUpdateManager.cs b/SteamWareLib/dbUpdateManager.cs
index 76d722d..25c07d6 100644
--- a/SteamWareLib/dbUpdateManager.cs
+++ b/SteamWareLib/dbUpdateManager.cs
@@ -34,7 +34,7 @@ namespace SteamWare
_connString = connectionString;
try
{
- _sqlScriptDir = SteamwareStrings.getFilePath(sqlDir);
+ _sqlScriptDir = fileMover.getFilePath(sqlDir);
}
catch
{
diff --git a/SteamWareLib/fileMover.cs b/SteamWareLib/fileMover.cs
index 2d7fb2d..217f607 100644
--- a/SteamWareLib/fileMover.cs
+++ b/SteamWareLib/fileMover.cs
@@ -844,6 +844,15 @@ namespace SteamWare
setDirs(System.Web.HttpContext.Current.Server.MapPath(_path));
}
///
+ /// restituisce la stringa completa e corretta del filepath del server (anche con vDir)
+ ///
+ /// path relativo alla cartella iis dell'applicativo
+ /// path fisico tradotto
+ public static string getFilePath(string pathRel)
+ {
+ return System.Web.HttpContext.Current.Server.MapPath(pathRel);
+ }
+ ///
/// esegue un comando in shell
///
///
diff --git a/SteamWareLib/logger.cs b/SteamWareLib/logger.cs
index 44202c6..c94cc1e 100644
--- a/SteamWareLib/logger.cs
+++ b/SteamWareLib/logger.cs
@@ -57,7 +57,7 @@ namespace SteamWare
string _logDir = memLayer.ML.confReadString("_logDir");
try
{
- _logBaseDir = SteamwareStrings.getFilePath(_logDir);
+ _logBaseDir = fileMover.getFilePath(_logDir);
}
catch (Exception exc)
{
diff --git a/SteamWareLib/utils.cs b/SteamWareLib/utils.cs
index 36e300f..4efe435 100644
--- a/SteamWareLib/utils.cs
+++ b/SteamWareLib/utils.cs
@@ -1093,149 +1093,6 @@ namespace SteamWare
#endregion
- ///
- /// Classe di metodi che estendono quelli base applicati alle string
- ///
- public class SteamwareStrings
- {
- ///
- /// Trasforma in MAIUSCOLo il primo carattere della stringa
- ///
- /// stringa da processare
- /// stringa processata
- public static string firstToUpper(string _stringaIN)
- {
- string _stringaOUT = _stringaIN;
- if (_stringaIN.Length > 1)
- {
- _stringaOUT = _stringaIN.Substring(0, 1).ToUpper() + _stringaIN.Substring(1, _stringaIN.Length - 1).ToLower();
- }
- return _stringaOUT;
- }
- ///
- /// restituisce la stringa completa e corretta del filepath del server (anche con vDir)
- ///
- /// path relativo alla cartella iis dell'applicativo
- /// path fisico tradotto
- public static string getFilePath(string pathRel)
- {
- return System.Web.HttpContext.Current.Server.MapPath(pathRel);
- }
-
- ///
- /// effettua escape di stringhe di ricerca di tipo filtro per apici e altri caratteri non ammessi
- ///
- ///
- ///
- public static string EscapeSqlLike(string s_)
- {
- StringBuilder sb = new StringBuilder(s_.Length);
- for (int i = 0; i < s_.Length; i++)
- {
- char c = s_[i];
- switch (c)
- {
- case ']':
- case '[':
- case '%':
- case '*':
- sb.Append("[").Append(c).Append("]");
- break;
- case '\'':
- sb.Append("''");
- break;
- default:
- sb.Append(c);
- break;
- }
- }
- return sb.ToString();
- }
- ///
- /// restituisce una stringa uguale all'originale + terminazione newline
- ///
- ///
- ///
- public static string addLine(object s)
- {
- return string.Format("{0}{1}", s, Environment.NewLine);
- }
- ///
- /// formatta un titolo
- ///
- /// Titolo da scrivere
- /// carattere x padding titolo
- /// larghezza caratteri (x pad)
- ///
- public static string charTitle(object title, char padChar, int repNum)
- {
- string answ = "";
- answ += addLine(new string(padChar, repNum));
- answ += addLine(string.Format("{0} {1}", padChar, title));
- answ += addLine(new string(padChar, repNum));
- return answ;
- }
- ///
- /// formatta una riga di caratteri
- ///
- /// carattere da utilizzare
- /// larghezza caratteri (x pad)
- ///
- public static string charLine(char padChar, int repNum)
- {
- string answ = "";
- answ += addLine(new string(padChar, repNum));
- return answ;
- }
- ///
- /// genera stringhe pseudo-casuali
- ///
- ///
- ///
- public static string pseudoRandomString(int Lenght)
- {
- string answ = "";
- var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
- var random = new Random();
- answ = new string(
- Enumerable.Repeat(chars, Lenght)
- .Select(s => s[random.Next(s.Length)])
- .ToArray());
- return answ;
- }
-
- ///
- /// limita una stringa al numero max di caratteri imposto
- ///
- ///
- ///
- ///
- public static string limitString(string original, int maxChar)
- {
- string outString = original;
- if (outString.Length > maxChar)
- {
- outString = string.Format("{0}...", original.Substring(0, maxChar - 3));
- }
- return outString;
- }
- ///
- /// limita una stringa al numero max di caratteri imposto prendendo ANCHE ultimi
- ///
- ///
- ///
- ///
- ///
- public static string limitString(string original, int maxChar, int lastNumChar)
- {
- string outString = original;
- if (outString.Length > maxChar)
- {
- outString = string.Format("{0}...{1}", original.Substring(0, maxChar - 3 - lastNumChar), original.Substring(outString.Length - lastNumChar));
- }
- return outString;
- }
- }
///
/// fornisce dati di base per l'utente
///