fix modalità ciclo ricerca...

This commit is contained in:
Samuele E. Locatelli
2018-09-18 18:11:49 +02:00
parent 428b7c8c68
commit dc9ee2cc35
2 changed files with 35 additions and 32 deletions
Vendored
+1 -1
View File
@@ -15,7 +15,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=309']) {
withEnv(['NEXT_BUILD_NUMBER=311']) {
// env.versionNumber = VersionNumber(versionNumberString : '2.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '2.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'SCMA'
+34 -31
View File
@@ -330,45 +330,48 @@ namespace OPC_UA_REDIS
else
{
bool trovato = false;
bool escludi = false;
bool keyExcluded = false;
string txt2find = "";
// se NON HO un MATCH processo il replace e se trovo corrispondenza processo
foreach (var item in nameRepRoles)
{
// cerco se escluso o aggiunto...
escludi = item.Value.modo == subsMode.X;
// parto da non trovato
trovato = false;
txt2find = item.Key;
// B --> cerco inizio
if (item.Value.search == substSearch.B)
// SE NON trovato procedo...
if (!trovato)
{
trovato = answ.StartsWith(txt2find);
}
// E --> cerco fine
else if (item.Value.search == substSearch.E)
{
trovato = answ.EndsWith(txt2find);
}
// I --> cerco IDENTICO
else if (item.Value.search == substSearch.I)
{
trovato = (answ == txt2find);
}
// C --> cerco OVUNQUE contenuto
else if (item.Value.search == substSearch.C)
{
trovato = answ.IndexOf(txt2find) >= 0;
}
// se trovato SOSTITUISCO...
if (trovato)
{
// effetuo sostituzione chiave/valore
answ = answ.Replace(txt2find, item.Value.tradz);
// cerco se escluso o aggiunto...
keyExcluded = item.Value.modo == subsMode.X;
// testo cercato
txt2find = item.Key;
// B --> cerco inizio
if (item.Value.search == substSearch.B)
{
trovato = answ.StartsWith(txt2find);
}
// E --> cerco fine
else if (item.Value.search == substSearch.E)
{
trovato = answ.EndsWith(txt2find);
}
// I --> cerco IDENTICO
else if (item.Value.search == substSearch.I)
{
trovato = (answ == txt2find);
}
// C --> cerco OVUNQUE contenuto
else if (item.Value.search == substSearch.C)
{
trovato = answ.IndexOf(txt2find) >= 0;
}
// se trovato SOSTITUISCO...
if (trovato)
{
// effetuo sostituzione chiave/valore
answ = answ.Replace(txt2find, item.Value.tradz);
}
}
}
// se è escluso --> salvo in escluso e restituisco NONE
if (escludi)
if (keyExcluded)
{
answ = "NONE";
// salvo in dizionario