Compare commits

...

118 Commits

Author SHA1 Message Date
Samuele Locatelli 6a845b7287 Refresh Readme x versioni 2024-09-20 15:23:18 +02:00
Samuele Locatelli 22a582b3a5 Merge tag 'AddRedisHashDelKey' into develop
Aggiunta metodi eliminazione key delete in hashset redis
2023-11-29 08:53:45 +01:00
Samuele Locatelli 299c65a075 Merge branch 'release/AddRedisHashDelKey' 2023-11-29 08:53:29 +01:00
Samuele Locatelli 8fe51d5a45 Memlayer / Redis:
- aggiunta metodo delete key x hask (singolo record)
- record codice (codemaid)
2023-11-29 08:52:57 +01:00
Samuele Locatelli d6c100b210 Merge tag 'FixLogDep01' into develop
Fix dipendenze libreria principale
2023-09-13 16:54:21 +02:00
Samuele Locatelli 5c347d15a6 Merge branch 'release/FixLogDep01' 2023-09-13 16:54:11 +02:00
Samuele Locatelli 4cc7af22c2 Completo rimozione dipendenze logging x steamwarelib 2023-09-13 16:53:47 +02:00
Samuele Locatelli 4322801521 continuo fix logging su steamwarelibs 2023-09-13 16:04:34 +02:00
Samuele Locatelli 7602d1beaf Update log x authProxy 2023-09-13 11:24:51 +02:00
Samuele Locatelli 11209fcaa7 ulteriori fix x logger 2023-09-13 11:11:45 +02:00
Samuele Locatelli 5d403348e5 ancora possibile fix dataWrap 2023-09-13 10:24:58 +02:00
Samuele Locatelli 8103f2bf7f Fix log x DataWrap 2023-09-13 10:04:20 +02:00
Samuele Locatelli 3f8b1b2eda Merge tag 'FixDeployVers01' into develop
fix yaml CI/CD x versione
2023-09-13 09:44:47 +02:00
Samuele Locatelli fa9340713d Merge branch 'release/FixDeployVers01' 2023-09-13 09:44:31 +02:00
Samuele Locatelli eeccf31039 Fix main vers 2023-09-13 09:42:27 +02:00
Samuele Locatelli e785b40e73 fix gitlab x num vers 2023-09-13 09:42:08 +02:00
Samuele Locatelli 14ff2c9c18 Merge tag 'fixUserStdLog02' into develop
fix log instance su main memLayer
2023-09-13 09:28:15 +02:00
Samuele Locatelli 824468232a Merge branch 'release/fixUserStdLog02' 2023-09-13 09:28:01 +02:00
Samuele Locatelli bf471ef881 Sostituzione instance logger 2023-09-13 09:26:20 +02:00
Samuele Locatelli e6f7e2fa8e Modifica e bonifica memlayer 2023-09-13 09:24:30 +02:00
Samuele Locatelli eb0da0fc86 Merge tag 'fixUserStdLog' into develop
Fix user_std x log
2023-09-13 09:02:35 +02:00
Samuele Locatelli ee8b68d8f8 Merge branch 'release/fixUserStdLog' 2023-09-13 09:02:25 +02:00
Samuele Locatelli afb5405f72 user_std:
- Logger da privato a NLog
2023-09-13 09:01:48 +02:00
Samuele Locatelli 3ce9120e6a Correzione example params x posta 2022-07-15 10:02:38 +02:00
Samuele Locatelli d8f26a555a Merge tag 'AddEmailTryResend' into develop
Aggiunto tentativo reinvio email da conf in caso di problemi/errori
2022-06-13 10:27:10 +02:00
Samuele Locatelli d558041ffe Merge branch 'release/AddEmailTryResend' 2022-06-13 10:26:58 +02:00
Samuele Locatelli 1bebccfb49 Aggiunta gestione tentativo re-invio email smtp 2022-06-13 10:26:18 +02:00
Samuele Locatelli 0e71c32823 Merge tag 'FixDocOnMain' into develop
pubblicaizone documentazione SOLO in ramo master/Main
2022-05-17 19:42:00 +02:00
Samuele Locatelli d465bd9194 Merge branch 'release/FixDocOnMain' 2022-05-17 19:41:52 +02:00
Samuele Locatelli b80750e194 Fix pubblicaizone SOLO in master/Main 2022-05-17 19:41:18 +02:00
Samuele Locatelli e504bf2bf4 Merge tag 'TestDocSteamWare.IO' into develop
test pubblicazione DocFx in ramo Develop
2022-05-17 19:38:04 +02:00
Samuele Locatelli b2a55384fa Merge branch 'release/TestDocSteamWare.IO' 2022-05-17 19:37:48 +02:00
Samuele Locatelli 57d25c88cd Aggiunta libreria complessiva SteamWare 2022-05-17 19:37:27 +02:00
Samuele Locatelli 28a29ed275 Aggiunta libreria scheduler 2022-05-17 19:35:54 +02:00
Samuele Locatelli a8562e8d16 update ymal x ultimi 2 progetti 2022-05-17 19:34:22 +02:00
Samuele Locatelli f4e3d52f72 Aggiunta libreria reports da documentare 2022-05-17 19:33:18 +02:00
Samuele Locatelli b281bf297f Aggiunta doc x Logger 2022-05-17 19:30:27 +02:00
Samuele Locatelli a10c10455d test in develop 2022-05-17 19:25:47 +02:00
Samuele Locatelli 142f123052 Test Aggiunta SteamWare.IO nella catena di pubblicazione documentazione 2022-05-17 19:25:22 +02:00
Samuele Locatelli 512061b912 Merge tag 'UpdateMailer' into develop
Update mailer in prod
2022-04-29 10:52:29 +02:00
Samuele Locatelli 5b255bacc3 Merge branch 'release/UpdateMailer' 2022-04-29 10:52:20 +02:00
Samuele Locatelli b46978a4e3 Merge branch 'feature/UpdateNuspec' into develop 2022-04-29 10:51:47 +02:00
Samuele Locatelli b310f48d2a Refresh mailer 2022-04-29 10:51:07 +02:00
Samuele Locatelli 9c4675cedb Typo correction 2022-04-29 10:30:26 +02:00
Samuele Locatelli f9e2d32eab Fix proj + fix yaml x sistemazione 2022-04-29 10:29:00 +02:00
Samuele Locatelli be3f6e1cac Merge tag 'UpdateNuget_2022.04.29' into develop
Update librerie nuget delle steamware libs + pulizia codice
2022-04-29 10:19:17 +02:00
Samuele Locatelli 9ae8535991 Merge branch 'release/UpdateNuget_2022.04.29' 2022-04-29 10:19:05 +02:00
Samuele Locatelli 34a62caa20 Merge branch 'feature/ChangheZipLibs_SnappyToIronSnappy' into develop 2022-04-29 10:17:59 +02:00
Samuele Locatelli b91f95eb92 update AIM mailer 2022-04-29 10:17:52 +02:00
Samuele Locatelli 645901b0b5 Upgrade steamware logger in main lib 2022-04-29 10:17:43 +02:00
Samuele Locatelli 503fd7a2dc Upgrade SharpCompress 2022-04-29 10:17:18 +02:00
Samuele Locatelli 2df2632036 Rimozione anche di IronSnappy compress 2022-04-29 10:17:05 +02:00
Samuele Locatelli c81df542c2 Update redis 2022-04-29 10:15:53 +02:00
Samuele Locatelli 9e4f23ea4c Update base microsoft libs 2022-04-29 10:15:40 +02:00
Samuele Locatelli 482da223d2 Update MongoDb libs 2022-04-29 10:15:28 +02:00
Samuele Locatelli 43c55348d8 Update NLog library 2022-04-29 10:13:06 +02:00
Samuele Locatelli 7e2fb53539 Continuo pulizia pack inutilizzati 2022-04-29 10:12:24 +02:00
Samuele Locatelli 025906656f RImozione pack deprecati + aggiunta nuovi 2022-04-29 10:11:57 +02:00
Samuele Locatelli 5a338bb70c Merge branch 'master' into develop 2022-04-28 19:38:05 +02:00
Samuele Locatelli 73025c24e4 Aggiunta metodo x aggiornare chaive in tab config (da testare) 2022-04-28 19:37:49 +02:00
Samuele E. Locatelli 86fa1ccfa0 Merge tag 'AddStepRelease' into develop
Agguinti vari step x sistemazione Release stage
2022-04-09 11:31:31 +02:00
Samuele E. Locatelli 27936753c9 Merge branch 'release/AddStepRelease' 2022-04-09 11:31:15 +02:00
Samuele E. Locatelli f5856e7280 Completato step release stabile 2022-04-09 11:30:24 +02:00
Samuele E. Locatelli 4aca107079 Merge branch 'develop' 2022-04-09 11:26:21 +02:00
Samuele E. Locatelli 765777018f Aggiunto step logger, provo push su main 2022-04-09 11:26:05 +02:00
Samuele E. Locatelli 02a7c3d71a Aggiunto step release 2022-04-09 11:23:46 +02:00
Samuele E. Locatelli bbb62df6bb Fix rename progetto scheduler con W maiuscola 2022-04-09 11:16:55 +02:00
Samuele E. Locatelli 341ccfa873 Aggiunto step staging x pubblicazione beta x ogni progetto 2022-04-09 11:11:55 +02:00
Samuele Locatelli 4afb94de7a Update riferimenti alla nuova folder 2022-04-09 11:03:26 +02:00
Samuele Locatelli 1d34719575 Rename DIR progetto steamwarelib --> steamware 2022-04-09 10:58:16 +02:00
Samuele Locatelli 63d747a7ea nome proj sbaglaito x main project 2022-04-09 10:46:54 +02:00
Samuele Locatelli a093eb420b Correzione step librerie principali 2022-04-09 10:45:43 +02:00
Samuele Locatelli 123fdc33c4 fix stringa num vers x assembly .cs 2022-04-09 10:44:30 +02:00
Samuele Locatelli 7493d5b257 correzione struttura dir progetto --> soluzione 2022-04-09 10:42:57 +02:00
Samuele Locatelli f725049565 typo recupero file conf vers 2022-04-09 10:41:30 +02:00
Samuele Locatelli fc963226e3 primo rilascio yaml 2022-04-09 10:40:38 +02:00
Samuele Locatelli ba4675b9da Merge tag 'FixJenkinsNugetPack' into develop
Fix processo pubblicazione: numero vers con 0 iniziale 4° cifra NON
piace a nuget pack
2022-04-09 10:07:02 +02:00
Samuele Locatelli 80303310bf Merge branch 'release/FixJenkinsNugetPack' 2022-04-09 10:06:43 +02:00
Samuele Locatelli c8860a675e Test modifica numero versione x pubblicazione nuget numero versione (NON vuole zeri iniziali) 2022-04-09 10:00:09 +02:00
Samuele Locatelli 9437b79975 Merge tag 'AddPubSubRedisMessagePipe' into develop
Aggiunta nuova funzionalità PuSub di redis tramite MessagePipe e testing
tramite testApp librerie
2022-04-09 09:45:59 +02:00
Samuele Locatelli 2f0ec40286 Merge branch 'release/AddPubSubRedisMessagePipe' 2022-04-09 09:45:38 +02:00
Samuele Locatelli 38f12b7d7e Completato test modalità PubSub REDIS x steamwarelibs 2022-04-09 09:44:40 +02:00
Samuele Locatelli 8aa9c8c6b7 Aggiunta preliminare MessagePipe 2022-04-08 19:14:37 +02:00
Samuele Locatelli 25496911e8 Merge branch 'master' into develop 2022-02-18 18:34:33 +01:00
Samuele Locatelli 9822806a32 Ancora try fix jenkinsfile... 2022-02-18 18:32:52 +01:00
Samuele Locatelli aef53f4275 Fix nuget release (maybe) 2022-02-18 18:29:17 +01:00
Samuele Locatelli a213b232c7 cambio vers AIM 2022-02-18 18:26:22 +01:00
Samuele Locatelli 3785bf0012 try fix main deploy lib task 2022-02-18 18:22:45 +01:00
Samuele Locatelli 55c2119db4 Merge branch 'develop' 2022-02-18 18:19:37 +01:00
Samuele Locatelli fb70a72aa2 Fix warning (maybe) 2022-02-18 18:19:10 +01:00
Samuele Locatelli a64bd14fb3 Merge tag 'fixJenkinsPipelineBuild16' into develop
Fix pipeline x pubblicazione
2022-02-18 18:08:38 +01:00
Samuele Locatelli 3d855360be Merge branch 'release/fixJenkinsPipelineBuild16' 2022-02-18 18:08:30 +01:00
Samuele Locatelli 025bcc7268 fix AIM vers 1.1.0 2022-02-18 18:07:20 +01:00
Samuele Locatelli edb4bd6099 Refresh nuget AIM upgrade 2022-02-18 18:00:41 +01:00
Samuele Locatelli b580b741a8 Fix msbuild (maybe) 2022-02-18 17:59:18 +01:00
Samuele Locatelli 48f4935598 Merge tag 'UpdateNugetAndFixTraduci' into develop
Fix traduzione in user_std senza eccezioni + fix update nuget
2022-02-18 17:54:13 +01:00
Samuele Locatelli 6e667e28b0 Merge branch 'release/UpdateNugetAndFixTraduci' 2022-02-18 17:53:52 +01:00
Samuele Locatelli 84ff58b2c3 Update zlib, autoref logger, ... 2022-02-18 17:53:20 +01:00
Samuele Locatelli 403907b41e NUget: update newtonsoft.json, DNS, Redis, pipeline 2022-02-18 17:52:49 +01:00
Samuele Locatelli 1cc808c9e2 NuGet Update system package 5-->6 2022-02-18 17:51:57 +01:00
Samuele Locatelli 61ba09f8cf nuget update: mongo, NLog, ... 2022-02-18 17:51:01 +01:00
Samuele Locatelli 05c2b82ba3 refresh nuget start 2022-02-18 17:48:39 +01:00
Samuele Locatelli 5681ea5159 fix gestione traduzione con eccezioni esposte in ser_std 2022-02-18 17:48:17 +01:00
Samuele Locatelli 90c5eb6df4 pulizia dll & file inutilizzati 2022-02-18 17:48:02 +01:00
Samuele Locatelli 0d322e4748 Update log x errore traduzione 2021-11-09 14:45:43 +01:00
Samuele Locatelli 39b2dc3b73 Merge tag 'FixHttpsDownloadNexus' into develop
Fix download nexus http --> https
2021-09-17 16:43:50 +02:00
Samuele Locatelli 8c5fc8b838 Merge branch 'release/FixHttpsDownloadNexus' 2021-09-17 16:43:39 +02:00
Samuele Locatelli 84d4df2329 mODIFICA METODO DOWNLOAD X HTTP --> HTTPS IN NEXUS 2021-09-17 16:43:08 +02:00
Samuele Locatelli 91ffbbe8dd Merge tag 'FixDWrap' into develop
Fix mnetodo init DWrap
2021-09-17 13:07:49 +02:00
Samuele Locatelli 6a512b14b6 Merge branch 'release/FixDWrap' 2021-09-17 13:06:50 +02:00
Samuele Locatelli 51aaba515f update init datawrap x errore login utente 2021-09-17 13:06:19 +02:00
Samuele Locatelli 05d38253a2 Merge tag 'fixEmptyRedisVal' into develop
Fix per permettere scrittura valore vuoto su REDIS
2021-08-19 12:08:24 +02:00
Samuele Locatelli 8b2be815a5 Merge branch 'release/fixEmptyRedisVal' 2021-08-19 12:08:05 +02:00
Samuele Locatelli 81704a5182 permesso di reset valori REDIS 2021-08-19 12:07:37 +02:00
Samuele Locatelli e0ab2cf853 Merge tag 'fixSe' into develop
Fix setRSV x caso chaive empty
2021-08-19 11:34:11 +02:00
Samuele Locatelli 21eec2959c Merge branch 'release/fixSe' 2021-08-19 11:33:57 +02:00
Samuele Locatelli 2011d1104c Update s evitare eccezioni in setRSV se key empty 2021-08-19 11:33:25 +02:00
Samuele Locatelli f6fb374c23 Merge tag 'ReloadAppConfFix' into develop
Riprostinato metodo init appConf
2021-08-11 15:27:23 +02:00
196 changed files with 11924 additions and 9506 deletions
+444
View File
@@ -0,0 +1,444 @@
variables:
NUGET_PATH: 'C:\Tools\nuget.exe'
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
SOL_NAME: 'SteamWare'
APP_NAME: 'SteamWare'
NUM_REL: '0.1.2.3'
NUM_DEB: '0.1.2-beta.3'
CONFIG: ''
VERS_MAIN: '5.3'
NEW_COPYRIGHT: 'Egalware @'
NET_SHARE_X: '\\codedoc.egalware.com\library'
NET_USER_X: 'gitlab'
.DocReplica: &DocReplica
- |
net use X: /delete
net use X: $env:NET_SHARE_X /u:$env:NET_USER_X $XDRIVE_PASSWD
ROBOCOPY docfx X:\$env:APP_NAME /MIR /XF .git* /XD .git
SLEEP 2
net use X: /delete
# helper x fix pacchetti nuget da repo locale nexus.steamware.net
.nuget-fix: &nuget-fix
- |
Set-Alias nuget C:\Tools\nuget.exe
$hasSource = nuget sources list | find "`"Steamware Nexus`"" /C
if ($hasSource -eq 0) {
nuget sources Add -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`""
} else {
nuget sources Update -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`""
}
echo $hasSource
# helper x recupero version number x pack
.version-fix: &version-fix
- |
# Esecuzione fix numero versione x pack nuget
$fileNameAss = 'SteamWare\SteamWare.cs';
$env:NUM_REL = $env:VERS_MAIN+"."+(get-date -format yyMM)+"."+(get-date -format dHH)
$env:NUM_DEB = $env:VERS_MAIN+"."+(get-date -format yyMM)+"-beta."+(get-date -format dHH)
$env:NEW_COPYRIGHT = "EgalWare @ 2006-" + (get-date -format yyyy)
$contenuto = Get-Content -path $fileNameAss -Raw
$newContenuto = $contenuto -replace '0.0.0.0', $env:NUM_REL
$newContenuto = $newContenuto -replace 'EgalWare © 2006', $env:NEW_COPYRIGHT
$newContenuto | Set-Content -Path $fileNameAss
# display versioni generate
$resoconto = "Effettuato fix file nuspec | release v: " + $env:NUM_REL + " | debug v: " + $env:NUM_DEB;
Write-Output $resoconto;
stages:
- build
- staging
- release
- docfx
# --------------------------------
# BUILD
# --------------------------------
SteamWare.IO:build:
stage: build
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare.IO
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
SteamWare.Logger:build:
stage: build
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare.Logger
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
SteamWare:build:
stage: build
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
SteamWare.Reports:build:
stage: build
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare.Reports
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
SteamWare.Scheduler:build:
stage: build
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare.Scheduler
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
# --------------------------------
# STAGING
# --------------------------------
SteamWare.IO:staging:
stage: staging
needs: ["SteamWare.IO:build"]
tags:
- win
variables:
CONFIG: Debug
APP_NAME: SteamWare.IO
except:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
SteamWare.Logger:staging:
stage: staging
needs: ["SteamWare.Logger:build"]
tags:
- win
variables:
CONFIG: Debug
APP_NAME: SteamWare.Logger
except:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
SteamWare:staging:
stage: staging
needs: ["SteamWare:build"]
tags:
- win
variables:
CONFIG: Debug
APP_NAME: SteamWare
except:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
SteamWare.Reports:staging:
stage: staging
needs: ["SteamWare.Reports:build"]
tags:
- win
variables:
CONFIG: Debug
APP_NAME: SteamWare.Reports
except:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
SteamWare.Scheduler:staging:
stage: staging
needs: ["SteamWare.Scheduler:build"]
tags:
- win
variables:
CONFIG: Debug
APP_NAME: SteamWare.Scheduler
except:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
# --------------------------------
# RELEASE
# --------------------------------
SteamWare.IO:release:
stage: release
needs: ["SteamWare.IO:build"]
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare.IO
only:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
SteamWare.Logger:release:
stage: release
needs: ["SteamWare.Logger:build"]
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare.Logger
only:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
SteamWare:release:
stage: release
needs: ["SteamWare:build"]
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare
only:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
SteamWare.Reports:release:
stage: release
needs: ["SteamWare.Reports:build"]
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare.Reports
only:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
SteamWare.Scheduler:release:
stage: release
needs: ["SteamWare.Scheduler:build"]
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare.Scheduler
only:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln"-verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
# --------------------------------
# DocFx
# --------------------------------
SteamWare.IO:docfx:
stage: docfx
needs: ["SteamWare.IO:build"]
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare.IO
only:
refs:
- main
- master
script:
- docfx $env:APP_NAME/docfx.json
- mv $env:APP_NAME/_site "docfx"
- *DocReplica
SteamWare.Logger:docfx:
stage: docfx
needs: ["SteamWare.Logger:build"]
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare.Logger
only:
refs:
- main
- master
script:
- docfx $env:APP_NAME/docfx.json
- mv $env:APP_NAME/_site "docfx"
- *DocReplica
SteamWare.Reports:docfx:
stage: docfx
needs: ["SteamWare.Reports:build"]
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare.Reports
only:
refs:
- main
- master
script:
- docfx $env:APP_NAME/docfx.json
- mv $env:APP_NAME/_site "docfx"
- *DocReplica
SteamWare.Scheduler:docfx:
stage: docfx
needs: ["SteamWare.Scheduler:build"]
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare.Scheduler
only:
refs:
- main
- master
script:
- docfx $env:APP_NAME/docfx.json
- mv $env:APP_NAME/_site "docfx"
- *DocReplica
SteamWare:docfx:
stage: docfx
needs: ["SteamWare:build"]
tags:
- win
variables:
CONFIG: Release
APP_NAME: SteamWare
only:
refs:
- main
- master
script:
- docfx $env:APP_NAME/docfx.json
- mv $env:APP_NAME/_site "docfx"
- *DocReplica
Vendored
+10 -9
View File
@@ -7,8 +7,8 @@ pipeline {
steps { steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */ /* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script { script {
env.versionNumber = VersionNumber(versionNumberString : '5.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILD_DATE_FORMATTED, "ddHH"}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumber = VersionNumber(versionNumberString : '5.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILD_DATE_FORMATTED, "dHH"}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.versionNumberBeta = VersionNumber(versionNumberString : '5.1.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILD_DATE_FORMATTED, "ddHH"}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '5.1.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILD_DATE_FORMATTED, "dHH"}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'SteamWareLib' env.APP_NAME = 'SteamWareLib'
} }
script { script {
@@ -36,24 +36,24 @@ pipeline {
IO: { IO: {
sleep 3; sleep 3;
// Reports lib // Reports lib
bat "\"${tool 'MSBuild-15.0'}\" SteamWare.IO\\SteamWare.IO.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /verbosity:minimal /m" bat "\"${tool 'MSBuild-16.0'}\" SteamWare.IO\\SteamWare.IO.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /verbosity:minimal /m"
}, },
LOGGER: { LOGGER: {
sleep 5; sleep 5;
// Reports lib // Reports lib
bat "\"${tool 'MSBuild-15.0'}\" SteamWare.Logger\\SteamWare.Logger.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /verbosity:minimal /m" bat "\"${tool 'MSBuild-16.0'}\" SteamWare.Logger\\SteamWare.Logger.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /verbosity:minimal /m"
}, },
MAIN_LIB: { MAIN_LIB: {
// MAIN lib // MAIN lib
bat "\"${tool 'MSBuild-15.0'}\" SteamWareLib\\SteamWare.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /verbosity:minimal /m" bat "\"${tool 'MSBuild-16.0'}\" SteamWareLib\\SteamWare.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /verbosity:minimal /m"
}, },
REPORTS: { REPORTS: {
// Reports lib // Reports lib
bat "\"${tool 'MSBuild-15.0'}\" SteamWare.Reports\\SteamWare.Reports.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /verbosity:minimal /m" bat "\"${tool 'MSBuild-16.0'}\" SteamWare.Reports\\SteamWare.Reports.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /verbosity:minimal /m"
}, },
SCHEDULER: { SCHEDULER: {
// Reports lib // Reports lib
bat "\"${tool 'MSBuild-15.0'}\" Steamware.Scheduler\\SteamWare.Scheduler.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /verbosity:minimal /m" bat "\"${tool 'MSBuild-16.0'}\" SteamWare.Scheduler\\SteamWare.Scheduler.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /verbosity:minimal /m"
}, },
failFast: false) failFast: false)
} }
@@ -104,9 +104,10 @@ pipeline {
}, },
MAIN_LIB: { MAIN_LIB: {
// BUILD! // BUILD!
bat "\"${tool 'MSBuild-16.0'}\" SteamWareLib\\SteamWare.csproj -target:Build /p:Configuration=${env.config} /p:Platform=\"Any CPU\" /p:OutputPath=bin/${env.config} /verbosity:minimal /m" bat "\"${tool 'MSBuild-16.0'}\" SteamWareLib\\SteamWare.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/Release /verbosity:minimal /m"
//bat "\"${tool 'MSBuild-16.0'}\" SteamWareLib\\SteamWare.csproj -target:Build /p:Configuration=${env.config} /p:Platform=\"Any CPU\" /p:OutputPath=bin/${env.config} /verbosity:minimal /m"
// creo package NuGet... con version in modo da fare ANCHE le beta // creo package NuGet... con version in modo da fare ANCHE le beta
bat "e:\\nuget.exe pack ${WORKSPACE}\\SteamWareLib\\SteamWare.csproj -properties Configuration=${env.config} -Version ${env.packVers}" bat "e:\\nuget.exe pack ${WORKSPACE}\\SteamWareLib\\SteamWare.csproj -properties Configuration=Release -Version ${env.packVers}"
}, },
REPORTS: { REPORTS: {
// BUILD Reports lib! // BUILD Reports lib!
+8 -4
View File
@@ -1,12 +1,16 @@
# SteamWareLib # SteamWare
Libreria di utility condivise per progetti SteamWare C# .net Libreria di utility condivise per progetti SteamWare C# .Net Framework.
## Note Rilascio ## Note Rilascio
### v.5.3 (2023.09.13)
Last Net Framework version
### v.3.3 (2019.10.10)
Versione riorganizzata con pubblicazione in formato nuget su repo privato SteamWare (http://nexus.steamware.net)
### v.3.1 (2018.03.17) ### v.3.1 (2018.03.17)
Versione riorganizzata del progetto GIT x correzione problemi di packaging Versione riorganizzata del progetto GIT x correzione problemi di packaging
### v.3.3 (2019.10.10)
Versione riorganizzata con pubblicazione in formato nuget su repo privato SteamWare (http://nexus.steamware.net)
BIN
View File
Binary file not shown.
+979 -929
View File
File diff suppressed because it is too large Load Diff
+47 -50
View File
@@ -34,47 +34,41 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Crc32C.NET, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="DnsClient, Version=1.6.0.0, Culture=neutral, PublicKeyToken=4574bb5573c51424, processorArchitecture=MSIL">
<HintPath>..\packages\Crc32C.NET.1.0.5.0\lib\net20\Crc32C.NET.dll</HintPath> <HintPath>..\packages\DnsClient.1.6.0\lib\net45\DnsClient.dll</HintPath>
</Reference> </Reference>
<Reference Include="DnsClient, Version=1.4.0.0, Culture=neutral, PublicKeyToken=4574bb5573c51424, processorArchitecture=MSIL"> <Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\DnsClient.1.4.0\lib\net45\DnsClient.dll</HintPath> <HintPath>..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.1.9, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.3.1\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath> <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="MongoDB.Bson, Version=2.15.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath> <HintPath>..\packages\MongoDB.Bson.2.15.0\lib\netstandard2.0\MongoDB.Bson.dll</HintPath>
</Reference> </Reference>
<Reference Include="MongoDB.Bson, Version=2.12.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MongoDB.Driver, Version=2.15.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Bson.2.12.0\lib\net452\MongoDB.Bson.dll</HintPath> <HintPath>..\packages\MongoDB.Driver.2.15.0\lib\netstandard2.0\MongoDB.Driver.dll</HintPath>
</Reference> </Reference>
<Reference Include="MongoDB.Driver, Version=2.12.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MongoDB.Driver.Core, Version=2.15.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.2.12.0\lib\net452\MongoDB.Driver.dll</HintPath> <HintPath>..\packages\MongoDB.Driver.Core.2.15.0\lib\netstandard2.0\MongoDB.Driver.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="MongoDB.Driver.Core, Version=2.12.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MongoDB.Libmongocrypt, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.Core.2.12.0\lib\net452\MongoDB.Driver.Core.dll</HintPath> <HintPath>..\packages\MongoDB.Libmongocrypt.1.3.0\lib\netstandard2.0\MongoDB.Libmongocrypt.dll</HintPath>
</Reference> </Reference>
<Reference Include="MongoDB.LibMongocrypt, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.LibMongocrypt.1.2.0\lib\net452\MongoDB.LibMongocrypt.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\NLog.5.2.4\lib\net46\NLog.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.8\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL"> <Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
<HintPath>..\packages\Pipelines.Sockets.Unofficial.2.2.0\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath> <HintPath>..\packages\Pipelines.Sockets.Unofficial.2.2.2\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath>
</Reference> </Reference>
<Reference Include="SharpCompress, Version=0.28.1.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL"> <Reference Include="SharpCompress, Version=0.31.0.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
<HintPath>..\packages\SharpCompress.0.28.1\lib\netstandard2.0\SharpCompress.dll</HintPath> <HintPath>..\packages\SharpCompress.0.31.0\lib\net461\SharpCompress.dll</HintPath>
</Reference>
<Reference Include="Snappy.NET, Version=1.1.1.8, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Snappy.NET.1.1.1.8\lib\net45\Snappy.NET.dll</HintPath>
</Reference> </Reference>
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL"> <Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
<HintPath>..\packages\StackExchange.Redis.2.2.4\lib\net461\StackExchange.Redis.dll</HintPath> <HintPath>..\packages\StackExchange.Redis.2.5.61\lib\net461\StackExchange.Redis.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
@@ -82,12 +76,12 @@
</Reference> </Reference>
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Diagnostics.PerformanceCounter, Version=5.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Diagnostics.PerformanceCounter, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.PerformanceCounter.5.0.1\lib\net461\System.Diagnostics.PerformanceCounter.dll</HintPath> <HintPath>..\packages\System.Diagnostics.PerformanceCounter.6.0.1\lib\net461\System.Diagnostics.PerformanceCounter.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Pipelines, Version=5.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.IO.Pipelines, Version=6.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Pipelines.5.0.1\lib\net461\System.IO.Pipelines.dll</HintPath> <HintPath>..\packages\System.IO.Pipelines.6.0.2\lib\net461\System.IO.Pipelines.dll</HintPath>
</Reference> </Reference>
<!-- <Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <!-- <Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath> <HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
@@ -104,8 +98,8 @@
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath> <HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath> <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference> </Reference>
<!-- <Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <!-- <Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath> <HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
@@ -132,11 +126,11 @@
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.Text.Encoding.CodePages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Text.Encoding.CodePages, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encoding.CodePages.5.0.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath> <HintPath>..\packages\System.Text.Encoding.CodePages.6.0.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Threading.Channels, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Channels.5.0.0\lib\net461\System.Threading.Channels.dll</HintPath> <HintPath>..\packages\System.Threading.Channels.6.0.0\lib\net461\System.Threading.Channels.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath> <HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
@@ -174,13 +168,19 @@
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
</Compile> </Compile>
<Compile Include="Redis.cs" /> <Compile Include="Redis.cs" />
<Compile Include="SteamWare.cs" /> <Compile Include="..\SteamWare\SteamWare.cs">
<Link>SteamWare.cs</Link>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\.editorconfig"> <None Include="..\.editorconfig">
<Link>.editorconfig</Link> <Link>.editorconfig</Link>
</None> </None>
<None Include="app.config" /> <None Include="app.config" />
<None Include="Core\Compression\Snappy\lib\linux\libsnappy64.so" />
<None Include="Core\Compression\Snappy\lib\osx\libsnappy64.dylib" />
<None Include="Core\Compression\Zstandard\lib\linux\libzstd.so" />
<None Include="Core\Compression\Zstandard\lib\osx\libzstd.dylib" />
<None Include="DataLayer_generic.xsc"> <None Include="DataLayer_generic.xsc">
<DependentUpon>DataLayer_generic.xsd</DependentUpon> <DependentUpon>DataLayer_generic.xsd</DependentUpon>
</None> </None>
@@ -203,8 +203,6 @@
<None Include="DS_Utility.xss"> <None Include="DS_Utility.xss">
<DependentUpon>DS_Utility.xsd</DependentUpon> <DependentUpon>DS_Utility.xsd</DependentUpon>
</None> </None>
<None Include="libmongocrypt.dylib" />
<None Include="libmongocrypt.so" />
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
@@ -217,23 +215,22 @@
<Name>SteamWare.Logger</Name> <Name>SteamWare.Logger</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="bin\" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Core\Compression\Snappy\lib\win\snappy32.dll" /> <Content Include="Core\Compression\Snappy\lib\win\snappy32.dll" />
<Content Include="Core\Compression\Snappy\lib\win\snappy64.dll" /> <Content Include="Core\Compression\Snappy\lib\win\snappy64.dll" />
<Content Include="Core\Compression\Zstandard\lib\win\libzstd.dll" /> <Content Include="Core\Compression\Zstandard\lib\win\libzstd.dll" />
<Content Include="mongocrypt.dll" />
</ItemGroup>
<ItemGroup>
<Folder Include="bin\" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\MongoDB.LibMongocrypt.1.2.0\build\MongoDB.Libmongocrypt.targets" Condition="Exists('..\packages\MongoDB.LibMongocrypt.1.2.0\build\MongoDB.Libmongocrypt.targets')" /> <Import Project="..\packages\MongoDB.Libmongocrypt.1.3.0\build\MongoDB.Libmongocrypt.targets" Condition="Exists('..\packages\MongoDB.Libmongocrypt.1.3.0\build\MongoDB.Libmongocrypt.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>Questo progetto fa riferimento a uno o più pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante è {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\MongoDB.LibMongocrypt.1.2.0\build\MongoDB.Libmongocrypt.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MongoDB.LibMongocrypt.1.2.0\build\MongoDB.Libmongocrypt.targets'))" /> <Error Condition="!Exists('..\packages\MongoDB.Libmongocrypt.1.3.0\build\MongoDB.Libmongocrypt.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MongoDB.Libmongocrypt.1.3.0\build\MongoDB.Libmongocrypt.targets'))" />
<Error Condition="!Exists('..\packages\MongoDB.Driver.Core.2.12.0\build\MongoDB.Driver.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MongoDB.Driver.Core.2.12.0\build\MongoDB.Driver.Core.targets'))" /> <Error Condition="!Exists('..\packages\MongoDB.Driver.Core.2.15.0\build\MongoDB.Driver.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MongoDB.Driver.Core.2.15.0\build\MongoDB.Driver.Core.targets'))" />
</Target> </Target>
<Import Project="..\packages\MongoDB.Driver.Core.2.12.0\build\MongoDB.Driver.Core.targets" Condition="Exists('..\packages\MongoDB.Driver.Core.2.12.0\build\MongoDB.Driver.Core.targets')" /> <Import Project="..\packages\MongoDB.Driver.Core.2.15.0\build\MongoDB.Driver.Core.targets" Condition="Exists('..\packages\MongoDB.Driver.Core.2.15.0\build\MongoDB.Driver.Core.targets')" />
</Project> </Project>
-11
View File
@@ -1,11 +0,0 @@
//
// This code was generated by a tool. Any changes made manually will be lost
// the next time this code is regenerated.
//
using System.Reflection;
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyCopyright("Steamware © 2006-2020")]
[assembly: AssemblyCompany("Steamware")]
+3
View File
@@ -0,0 +1,3 @@
# SteamWare.IO
Impiegare il men&ugrave; laterale per navigare nel codice del progetto.
Binary file not shown.
+15 -3
View File
@@ -10,7 +10,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="SharpCompress" publicKeyToken="afb0a02973931d96" culture="neutral" /> <assemblyIdentity name="SharpCompress" publicKeyToken="afb0a02973931d96" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-0.28.1.0" newVersion="0.28.1.0" /> <bindingRedirect oldVersion="0.0.0.0-0.31.0.0" newVersion="0.31.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
@@ -18,16 +18,28 @@
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.1" newVersion="5.0.0.1" /> <bindingRedirect oldVersion="0.0.0.0-6.0.0.2" newVersion="6.0.0.2" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="DnsClient" publicKeyToken="4574bb5573c51424" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.6.0.0" newVersion="1.6.0.0" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<startup> <startup>
+3
View File
@@ -0,0 +1,3 @@
# SteamWare.IO:
Libreria x accesso filesystem / IO in genere
+1
View File
@@ -0,0 +1 @@
#[Introduction](intro.md)
+68
View File
@@ -0,0 +1,68 @@
{
"metadata": [
{
"src": [
{
"files": [
"*.csproj"
],
"cwd": ".",
"exclude": [
"**/obj/**",
"**/bin/**",
"_site/**"
]
}
],
"dest": "obj/api"
}
],
"build": {
"content": [
{
"files": [
"api/**.yml"
],
"cwd": "obj"
},
{
"files": [
"api/*.md",
"articles/**.md",
"toc.yml",
"*.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"resource": [
{
"files": [
"images/**"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"overwrite": [
{
"files": [
"apidoc/**.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"dest": "_site",
"template": [
"default"
]
}
}
+1289 -1247
View File
File diff suppressed because it is too large Load Diff
+13
View File
@@ -0,0 +1,13 @@
# SteamWare.IO
Documentazione relativa alla libreria SteamWare.IO.
Vedere la sezione Articles per maggiori informazioni sulle definizioni, l'impiego ed esempi.
## Articles
Per maggiori dettagli, definizioni e demo funzionamento si rimanda alla sezione Articles
## Api
Per ogni dettaglio e riferimento alla libreria si rimanda alla sezione Api Documentation
Binary file not shown.
Binary file not shown.
+367 -317
View File
@@ -1,5 +1,7 @@
using MongoDB.Driver; using MongoDB.Driver;
using Newtonsoft.Json; using Newtonsoft.Json;
using NLog.Fluent;
using NLog;
using StackExchange.Redis; using StackExchange.Redis;
using SteamWare.Logger; using SteamWare.Logger;
using System; using System;
@@ -17,52 +19,6 @@ namespace SteamWare.IO
/// </summary> /// </summary>
public class memLayer public class memLayer
{ {
#region Private Fields
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
{
string RedisConn = memLayer.ML.confReadString("RedisConn");
if (string.IsNullOrEmpty(RedisConn))
{
RedisConn = "localhost,abortConnect=false,ssl=false";
}
return ConnectionMultiplexer.Connect(RedisConn);
});
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private Lazy<ConnectionMultiplexer> lazyConnectionAdmin = new Lazy<ConnectionMultiplexer>(() =>
{
string RedisConnAdmin = memLayer.ML.confReadString("RedisConnAdmin");
if (string.IsNullOrEmpty(RedisConnAdmin))
{
RedisConnAdmin = "localhost,abortConnect=false,ssl=false,allowAdmin=true";
}
return ConnectionMultiplexer.Connect(RedisConnAdmin);
});
#endregion Private Fields
#region Protected Fields
/// <summary>
/// lettore file configurazione
/// </summary>
protected AppSettingsReader configAppSetReader;
/// <summary>
/// Oggetto MongoDbCLient x accesso al motore
/// </summary>
protected MongoClient currMongoClient;
#endregion Protected Fields
#region Public Fields #region Public Fields
/// <summary> /// <summary>
@@ -87,23 +43,6 @@ namespace SteamWare.IO
#endregion Public Fields #endregion Public Fields
#region Protected Constructors
/// <summary>
/// classe gestione accessi a Session, cache, viewstate, configuration...
/// </summary>
protected memLayer()
{
// istanzia il conf setting reader...
configAppSetReader = new AppSettingsReader();
// avvio e configuro TA
initTA();
setupConnectionStringBase();
setupMongo();
}
#endregion Protected Constructors
#region Public Enums #region Public Enums
/// <summary> /// <summary>
@@ -134,59 +73,6 @@ namespace SteamWare.IO
#endregion Public Enums #endregion Public Enums
#region Private Properties
/// <summary>
/// Oggetto currentDb locale
/// </summary>
private IDatabase _currDB { get; set; }
#endregion Private Properties
#region Protected Properties
/// <summary>
/// stringa conn x DB CONF
/// </summary>
protected string connStringDbConf
{
get
{
string answ = "";
answ = confReadString("DbConfConnectionString");
// se fosse vuota fallback a path dei permessi...
if (string.IsNullOrEmpty(answ))
{
answ = confReadString("PermessiConnectionString");
}
// se ancora vuota --> devAuth
if (string.IsNullOrEmpty(answ))
{
answ = confReadString("DevicesAuthConnectionString");
}
return answ;
}
}
/// <summary>
/// Stringa di connessione mongoDb
/// </summary>
protected string mongoConnString
{
get
{
string answ = "";
answ = confReadString("mdbConnString");
if (string.IsNullOrEmpty(answ))
{
answ = "mongodb://W2019-MONGODB:27017";
}
return answ;
}
}
#endregion Protected Properties
#region Public Properties #region Public Properties
/// <summary> /// <summary>
@@ -304,7 +190,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error(string.Format("Errore in lettura valore maxAgeAppConf_min{0}{1}", Environment.NewLine, exc)); Log.Error(string.Format("Errore in lettura valore maxAgeAppConf_min{0}{1}", Environment.NewLine, exc));
} }
return maxAge * 60; return maxAge * 60;
} }
@@ -351,7 +237,8 @@ namespace SteamWare.IO
} }
/// <summary> /// <summary>
/// Verifica se si debba serializzare ogni valore complesso (tabelle/righe) in sessione (per impiego di sessioni avanzate come Redis) /// Verifica se si debba serializzare ogni valore complesso (tabelle/righe) in sessione (per
/// impiego di sessioni avanzate come Redis)
/// </summary> /// </summary>
public bool serializeSession public bool serializeSession
{ {
@@ -380,7 +267,7 @@ namespace SteamWare.IO
catch (Exception exc) catch (Exception exc)
{ {
answ = new Dictionary<string, string>(); answ = new Dictionary<string, string>();
Logging.Instance.Error(string.Format("Eccezzione in tabelleInCache{0}{1}", Environment.NewLine, exc)); Log.Error(string.Format("Eccezzione in tabelleInCache{0}{1}", Environment.NewLine, exc));
} }
return answ; return answ;
} }
@@ -420,162 +307,6 @@ namespace SteamWare.IO
#endregion Public Properties #endregion Public Properties
#region Private Methods
/// <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);
}
/// <summary>
/// Init accesso MongoDb
/// </summary>
private void setupMongo()
{
currMongoClient = new MongoClient(mongoConnString);
}
#endregion Private Methods
#region Protected Methods
/// <summary>
/// init dei table adapters
/// </summary>
protected void initTA()
{
taConfig = new DS_UtilityTableAdapters.ConfigTableAdapter();
taConfigTmp = new DS_UtilityTableAdapters.ConfigTmpTableAdapter();
}
/// <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();
DS_Utility.ConfigDataTable tabDati = null;
int waitMs = 100;
int numTry = 5;
do
{
try
{
tabDati = nML.taConfig.GetData();
}
catch (Exception exc)
{
numTry--;
Logging.Instance.Error($"Errore procedura nML.taConfig.GetData(), numTry = {numTry}, now {waitMs}ms wait{Environment.NewLine}{exc}");
Thread.Sleep(waitMs);
}
} while (numTry > 0 && tabDati == null);
if (tabDati != null)
{
// carico
foreach (DS_Utility.ConfigRow riga in tabDati)
{
try
{
answ.Add(riga.chiave, riga.valore);
}
catch (Exception exc)
{
Logging.Instance.Error(string.Format("Errore procedura ricaricaAppConf per kvp: {0} / {1}{2}{3}", riga.chiave, riga.valore, Environment.NewLine, exc));
}
}
// log ricarica
Logging.Instance.Info(string.Format("Effettuata procedura ricaricaAppConf per {0} records", answ.Count));
}
return answ;
}
/// <summary>
/// effettua setup dei connection strings da web.config delal singola applicazione
/// </summary>
protected virtual void setupConnectionStringBase()
{
// connections del db
taConfig.Connection.ConnectionString = connStringDbConf;
taConfigTmp.Connection.ConnectionString = connStringDbConf;
}
/// <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();
if (AppConf.Count > 0)
{
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);
Logging.Instance.Info("Completato procedura startupAppConf");
}
else
{
Logging.Instance.Error("Errore in procedura startupAppConf, ritornato insieme vuoto");
}
}
}
catch (Exception exc)
{
Logging.Instance.Error(string.Format("Errore in startupAppConf:{0}{1}", Environment.NewLine, exc));
}
}
}
#endregion Protected Methods
#region Public Methods #region Public Methods
/// <summary> /// <summary>
@@ -589,12 +320,13 @@ namespace SteamWare.IO
} }
/// <summary> /// <summary>
/// aggiunge la stringa corrente nel dictionary delle tabelle messe in cache e da aggiornare su comando update /// aggiunge la stringa corrente nel dictionary delle tabelle messe in cache e da aggiornare
/// su comando update
/// </summary> /// </summary>
/// <param name="nuovaTab"></param> /// <param name="nuovaTab"></param>
public void addTabInCache(string nuovaTab) public void addTabInCache(string nuovaTab)
{ {
// provo ad aggiungere nuova tab in elenco... // provo ad aggiungere nuova tab in elenco...
Dictionary<string, string> _tabelleInCache = tabelleInCache; Dictionary<string, string> _tabelleInCache = tabelleInCache;
try try
{ {
@@ -606,13 +338,14 @@ namespace SteamWare.IO
} }
/// <summary> /// <summary>
/// aggiunge la stringa corrente nel dictionary delle tabelle messe in session che vanno preservate da comando update (es: oggetto selezionato...) /// aggiunge la stringa corrente nel dictionary delle tabelle messe in session che vanno
/// preservate da comando update (es: oggetto selezionato...)
/// </summary> /// </summary>
/// <param name="nomePar"></param> /// <param name="nomePar"></param>
/// <param name="valore"></param> /// <param name="valore"></param>
public void addValInSession(string nomePar, string valore) public void addValInSession(string nomePar, string valore)
{ {
// provo ad aggiungere nuova tab in elenco... // provo ad aggiungere nuova tab in elenco...
Dictionary<string, string> _valoriInSession2Survive = valSess2SurvUpd; Dictionary<string, string> _valoriInSession2Survive = valSess2SurvUpd;
// verifico se fare update o insert... // verifico se fare update o insert...
if (_valoriInSession2Survive.ContainsKey(nomePar)) if (_valoriInSession2Survive.ContainsKey(nomePar))
@@ -707,12 +440,12 @@ namespace SteamWare.IO
bool fatto = bool.TryParse(sVal, out answ); bool fatto = bool.TryParse(sVal, out answ);
if (!fatto) if (!fatto)
{ {
Logging.Instance.Error($"Errore in lettura chiave [{chiave}] durante cdvb: ricevuto {sVal}"); Log.Error($"Errore in lettura chiave [{chiave}] durante cdvb: ricevuto {sVal}");
} }
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error($"Eccezzione in lettura chiave [{chiave}] durante cdvb{Environment.NewLine}{exc}"); Log.Error($"Eccezzione in lettura chiave [{chiave}] durante cdvb{Environment.NewLine}{exc}");
} }
} }
return answ; return answ;
@@ -735,12 +468,12 @@ namespace SteamWare.IO
bool fatto = int.TryParse(sVal, out answ); bool fatto = int.TryParse(sVal, out answ);
if (!fatto) if (!fatto)
{ {
Logging.Instance.Error($"Errore in lettura chiave [{chiave}] durante cdvi: ricevuto {sVal}"); Log.Error($"Errore in lettura chiave [{chiave}] durante cdvi: ricevuto {sVal}");
} }
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error($"Eccezzione in lettura chiave [{chiave}] durante cdvi{Environment.NewLine}{exc}"); Log.Error($"Eccezzione in lettura chiave [{chiave}] durante cdvi{Environment.NewLine}{exc}");
} }
} }
return answ; return answ;
@@ -793,7 +526,7 @@ namespace SteamWare.IO
// controllo SE in redis ci sia ancora il valore, altrimenti rileggo... // controllo SE in redis ci sia ancora il valore, altrimenti rileggo...
if (!redKeyPresent(ACBH)) if (!redKeyPresent(ACBH))
{ {
Logging.Instance.Info(string.Format("Manca HASH in redis --> rileggo da DB --> REDIS --> Memoria | {0} | {1}", ACBH, chiave)); Log.Info(string.Format("Manca HASH in redis --> rileggo da DB --> REDIS --> Memoria | {0} | {1}", ACBH, chiave));
resetAppConf(); resetAppConf();
} }
// provo a leggere da DICT // provo a leggere da DICT
@@ -805,7 +538,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error(string.Format("Errore in lettura AppConf[{0}] durante configDbVal{1}{2}", chiave, Environment.NewLine, exc)); Log.Error(string.Format("Errore in lettura AppConf[{0}] durante configDbVal{1}{2}", chiave, Environment.NewLine, exc));
} }
} }
} }
@@ -1152,7 +885,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error(string.Format("Eccezione in getRSV:{0}{1}", Environment.NewLine, exc)); Log.Error(string.Format("Eccezione in getRSV:{0}{1}", Environment.NewLine, exc));
} }
return answInt; return answInt;
} }
@@ -1193,7 +926,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error(string.Format("Eccezione in getRKeys:{0}{1}", Environment.NewLine, exc)); Log.Error(string.Format("Eccezione in getRKeys:{0}{1}", Environment.NewLine, exc));
} }
return answ; return answ;
} }
@@ -1212,7 +945,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
//logger.lg.scriviLog(string.Format("Errore in getRSV:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); Log.Error($"Eccezione in getRSV:{Environment.NewLine}{exc}");
} }
return answ; return answ;
} }
@@ -1283,7 +1016,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error(string.Format("Eccezzione in verifica isInCacheObject REDIS per chiave{0}{1}{2}", nomeVar, Environment.NewLine, exc)); Log.Error(string.Format("Eccezzione in verifica isInCacheObject REDIS per chiave{0}{1}{2}", nomeVar, Environment.NewLine, exc));
} }
} }
else else
@@ -1302,7 +1035,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error(string.Format("Eccezzione in verifica isInCacheObject per chiave{0}{1}{2}", nomeVar, Environment.NewLine, exc)); Log.Error(string.Format("Eccezzione in verifica isInCacheObject per chiave{0}{1}{2}", nomeVar, Environment.NewLine, exc));
} }
} }
return answ; return answ;
@@ -1475,8 +1208,7 @@ namespace SteamWare.IO
public int redCountKey(string keyPattern) public int redCountKey(string keyPattern)
{ {
int answ = 0; int answ = 0;
// cerco se ci sia valore in redis... // cerco se ci sia valore in redis... se vuoto = ALL...
// se vuoto = ALL...
keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern; keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern;
try try
{ {
@@ -1491,7 +1223,30 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error($"Eccezione in redCountKey:{Environment.NewLine}{exc}"); Log.Error($"Eccezione in redCountKey:{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
/// ELIMINA un SINGOLO VALORE dalla hash (dato field = chiave)
/// </summary>
/// <param name="hashKey"></param>
/// <param name="hashField"></param>
/// <returns></returns>
public bool redDelHashField(string hashKey, string hashField)
{
bool answ = false;
// cerco se ci sia valore in redis...
try
{
RedisKey chiave = hashKey;
RedisValue campo = hashField;
answ = cache.HashDelete(chiave, campo);
}
catch (Exception exc)
{
Log.Error($"Errore in redDelHashField{Environment.NewLine}{exc}");
} }
return answ; return answ;
} }
@@ -1524,8 +1279,7 @@ namespace SteamWare.IO
public bool redFlushKey(string keyPattern) public bool redFlushKey(string keyPattern)
{ {
bool answ = false; bool answ = false;
// cerco se ci sia valore in redis... // cerco se ci sia valore in redis... se vuoto = ALL...
// se vuoto = ALL...
keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern; keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern;
try try
{ {
@@ -1542,7 +1296,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error($"Eccezione in redFlushKey{Environment.NewLine}{exc}"); Log.Error($"Eccezione in redFlushKey{Environment.NewLine}{exc}");
} }
return answ; return answ;
} }
@@ -1577,7 +1331,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error($"Eccezione in redGetCounterByKey{Environment.NewLine}{exc}"); Log.Error($"Eccezione in redGetCounterByKey{Environment.NewLine}{exc}");
} }
// ora recupero valori! // ora recupero valori!
var valori = getRKeys(chiavi); var valori = getRKeys(chiavi);
@@ -1690,7 +1444,8 @@ namespace SteamWare.IO
} }
/// <summary> /// <summary>
/// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da funzionalita' DbConfig) + keyName richiesto... /// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da
/// funzionalita' DbConfig) + keyName richiesto...
/// </summary> /// </summary>
public string redHash(string keyName) public string redHash(string keyName)
{ {
@@ -1719,7 +1474,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error(string.Format("Eccezione in redHashPresent per la key {2}{0}{1}", Environment.NewLine, exc, key)); Log.Error(string.Format("Eccezione in redHashPresent per la key {2}{0}{1}", Environment.NewLine, exc, key));
} }
return answ; return answ;
} }
@@ -1757,7 +1512,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error(string.Format("Eccezione in redKeyPresent per la key {2}:{0}{1}", Environment.NewLine, exc, key)); Log.Error(string.Format("Eccezione in redKeyPresent per la key {2}:{0}{1}", Environment.NewLine, exc, key));
} }
return answ; return answ;
} }
@@ -1813,7 +1568,9 @@ namespace SteamWare.IO
/// </summary> /// </summary>
/// <param name="hashKey">chiave</param> /// <param name="hashKey">chiave</param>
/// <param name="hashFields">valori</param> /// <param name="hashFields">valori</param>
/// <param name="expireSeconds">scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)</param> /// <param name="expireSeconds">
/// scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)
/// </param>
/// <returns></returns> /// <returns></returns>
public bool redSaveHash(string hashKey, KeyValuePair<string, string>[] hashFields, double expireSeconds = -1) public bool redSaveHash(string hashKey, KeyValuePair<string, string>[] hashFields, double expireSeconds = -1)
{ {
@@ -1867,7 +1624,9 @@ namespace SteamWare.IO
/// </summary> /// </summary>
/// <param name="hashKey">chiave</param> /// <param name="hashKey">chiave</param>
/// <param name="hashFields">valori</param> /// <param name="hashFields">valori</param>
/// <param name="expireSeconds">scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)</param> /// <param name="expireSeconds">
/// scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)
/// </param>
/// <returns></returns> /// <returns></returns>
public bool redSaveHashDict(string hashKey, Dictionary<string, string> hashFields, double expireSeconds = -1) public bool redSaveHashDict(string hashKey, Dictionary<string, string> hashFields, double expireSeconds = -1)
{ {
@@ -1940,7 +1699,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error($"redServInfo:{Environment.NewLine}{exc}"); Log.Error($"redServInfo:{Environment.NewLine}{exc}");
} }
return answ; return answ;
} }
@@ -1968,7 +1727,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error(string.Format("Eccezione in resetRCnt:{0}{1}", Environment.NewLine, exc)); Log.Error(string.Format("Eccezione in resetRCnt:{0}{1}", Environment.NewLine, exc));
} }
return answ; return answ;
} }
@@ -2091,7 +1850,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error(string.Format("Eccezzione in setRCD:{0}{1}", Environment.NewLine, exc)); Log.Error(string.Format("Eccezzione in setRCD:{0}{1}", Environment.NewLine, exc));
} }
return answ; return answ;
} }
@@ -2110,13 +1869,13 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error(string.Format("Eccezzione in setRCI:{0}{1}", Environment.NewLine, exc)); Log.Error(string.Format("Eccezzione in setRCI:{0}{1}", Environment.NewLine, exc));
} }
return answ; return answ;
} }
/// <summary> /// <summary>
/// Salva un set KVP (Key Value Pair) in RedisCache /// Salva un set KVP (Key Value Pair) in RedisCache
/// </summary> /// </summary>
/// <param name="valori">Set KVP chiave-valore da salvare</param> /// <param name="valori">Set KVP chiave-valore da salvare</param>
/// <returns></returns> /// <returns></returns>
@@ -2130,7 +1889,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error(string.Format("Eccezione in setRKeys:{0}{1}", Environment.NewLine, exc)); Log.Error(string.Format("Eccezione in setRKeys:{0}{1}", Environment.NewLine, exc));
} }
return answ; return answ;
} }
@@ -2144,14 +1903,21 @@ namespace SteamWare.IO
public bool setRSV(string chiave, string valore) public bool setRSV(string chiave, string valore)
{ {
bool answ = false; bool answ = false;
try if (!string.IsNullOrEmpty(chiave))
{ {
cache.StringSet(chiave, valore); try
answ = true; {
cache.StringSet(chiave, valore);
answ = true;
}
catch (Exception exc)
{
Log.Error(string.Format("Eccezzione in setRSV:{0}{1}", Environment.NewLine, exc));
}
} }
catch (Exception exc) else
{ {
Logging.Instance.Error(string.Format("Eccezzione in setRSV:{0}{1}", Environment.NewLine, exc)); Log.Error("Errore: chiave non valida (vuota) in setRSV");
} }
return answ; return answ;
} }
@@ -2175,7 +1941,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Logging.Instance.Error(string.Format("Eccezzione in setRSV:{0}{1}", Environment.NewLine, exc)); Log.Error(string.Format("Eccezzione in setRSV:{0}{1}", Environment.NewLine, exc));
} }
return answ; return answ;
} }
@@ -2203,7 +1969,9 @@ namespace SteamWare.IO
/// </summary> /// </summary>
/// <param name="nome">nome della variabile</param> /// <param name="nome">nome della variabile</param>
/// <param name="dSet">DataSet da salvare</param> /// <param name="dSet">DataSet da salvare</param>
/// <param name="surviveUpdate">indica se debba sopravvivere ad update (inserita in elenco valSess2SurvUpd)</param> /// <param name="surviveUpdate">
/// indica se debba sopravvivere ad update (inserita in elenco valSess2SurvUpd)
/// </param>
/// <returns></returns> /// <returns></returns>
public bool setSessionDataSet(string nome, DataSet dSet, bool surviveUpdate) public bool setSessionDataSet(string nome, DataSet dSet, bool surviveUpdate)
{ {
@@ -2243,7 +2011,9 @@ namespace SteamWare.IO
/// </summary> /// </summary>
/// <param name="nome">nome della variabile</param> /// <param name="nome">nome della variabile</param>
/// <param name="dTable">DataTable da salvare</param> /// <param name="dTable">DataTable da salvare</param>
/// <param name="surviveUpdate">indica se debba sopravvivere ad update (inserita in elenco valSess2SurvUpd)</param> /// <param name="surviveUpdate">
/// indica se debba sopravvivere ad update (inserita in elenco valSess2SurvUpd)
/// </param>
public bool setSessionDataTable(string nome, DataTable dTable, bool surviveUpdate) public bool setSessionDataTable(string nome, DataTable dTable, bool surviveUpdate)
{ {
bool _done = false; bool _done = false;
@@ -2282,7 +2052,9 @@ namespace SteamWare.IO
/// </summary> /// </summary>
/// <param name="nome">nome della variabile</param> /// <param name="nome">nome della variabile</param>
/// <param name="valore">valore associato</param> /// <param name="valore">valore associato</param>
/// <param name="surviveUpdate">indica se debba sopravvivere ad update (inserita in elenco valSess2SurvUpd)</param> /// <param name="surviveUpdate">
/// indica se debba sopravvivere ad update (inserita in elenco valSess2SurvUpd)
/// </param>
/// <returns></returns> /// <returns></returns>
public bool setSessionVal(string nome, object valore, bool surviveUpdate) public bool setSessionVal(string nome, object valore, bool surviveUpdate)
{ {
@@ -2349,5 +2121,283 @@ namespace SteamWare.IO
} }
#endregion Public Methods #endregion Public Methods
#region Protected Fields
/// <summary>
/// lettore file configurazione
/// </summary>
protected AppSettingsReader configAppSetReader;
/// <summary>
/// Oggetto MongoDbCLient x accesso al motore
/// </summary>
protected MongoClient currMongoClient;
#endregion Protected Fields
#region Protected Constructors
/// <summary>
/// classe gestione accessi a Session, cache, viewstate, configuration...
/// </summary>
protected memLayer()
{
if (Log == null)
{
Log = LogManager.GetCurrentClassLogger();
}
// istanzia il conf setting reader...
configAppSetReader = new AppSettingsReader();
// avvio e configuro TA
initTA();
setupConnectionStringBase();
setupMongo();
}
#endregion Protected Constructors
#region Protected Properties
/// <summary>
/// stringa conn x DB CONF
/// </summary>
protected string connStringDbConf
{
get
{
string answ = "";
answ = confReadString("DbConfConnectionString");
// se fosse vuota fallback a path dei permessi...
if (string.IsNullOrEmpty(answ))
{
answ = confReadString("PermessiConnectionString");
}
// se ancora vuota --> devAuth
if (string.IsNullOrEmpty(answ))
{
answ = confReadString("DevicesAuthConnectionString");
}
return answ;
}
}
/// <summary>
/// Stringa di connessione mongoDb
/// </summary>
protected string mongoConnString
{
get
{
string answ = "";
answ = confReadString("mdbConnString");
if (string.IsNullOrEmpty(answ))
{
answ = "mongodb://W2019-MONGODB:27017";
}
return answ;
}
}
#endregion Protected Properties
#region Protected Methods
/// <summary>
/// init dei table adapters
/// </summary>
protected void initTA()
{
taConfig = new DS_UtilityTableAdapters.ConfigTableAdapter();
taConfigTmp = new DS_UtilityTableAdapters.ConfigTmpTableAdapter();
}
/// <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();
DS_Utility.ConfigDataTable tabDati = null;
int waitMs = 100;
int numTry = 5;
do
{
try
{
tabDati = nML.taConfig.GetData();
}
catch (Exception exc)
{
numTry--;
Log.Error($"Errore procedura nML.taConfig.GetData(), numTry = {numTry}, now {waitMs}ms wait{Environment.NewLine}{exc}");
Thread.Sleep(waitMs);
}
} while (numTry > 0 && tabDati == null);
if (tabDati != null)
{
// carico
foreach (DS_Utility.ConfigRow riga in tabDati)
{
try
{
answ.Add(riga.chiave, riga.valore);
}
catch (Exception exc)
{
Log.Error(string.Format("Errore procedura ricaricaAppConf per kvp: {0} / {1}{2}{3}", riga.chiave, riga.valore, Environment.NewLine, exc));
}
}
// log ricarica
Log.Info(string.Format("Effettuata procedura ricaricaAppConf per {0} records", answ.Count));
}
return answ;
}
/// <summary>
/// effettua setup dei connection strings da web.config delal singola applicazione
/// </summary>
protected virtual void setupConnectionStringBase()
{
// connections del db
taConfig.Connection.ConnectionString = connStringDbConf;
taConfigTmp.Connection.ConnectionString = connStringDbConf;
}
/// <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();
if (AppConf.Count > 0)
{
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);
Log.Info("Completato procedura startupAppConf");
}
else
{
Log.Error("Errore in procedura startupAppConf, ritornato insieme vuoto");
}
}
}
catch (Exception exc)
{
Log.Error(string.Format("Errore in startupAppConf:{0}{1}", Environment.NewLine, exc));
}
}
}
#endregion Protected Methods
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
{
string RedisConn = memLayer.ML.confReadString("RedisConn");
if (string.IsNullOrEmpty(RedisConn))
{
RedisConn = "localhost,abortConnect=false,ssl=false";
}
return ConnectionMultiplexer.Connect(RedisConn);
});
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private Lazy<ConnectionMultiplexer> lazyConnectionAdmin = new Lazy<ConnectionMultiplexer>(() =>
{
string RedisConnAdmin = memLayer.ML.confReadString("RedisConnAdmin");
if (string.IsNullOrEmpty(RedisConnAdmin))
{
RedisConnAdmin = "localhost,abortConnect=false,ssl=false,allowAdmin=true";
}
return ConnectionMultiplexer.Connect(RedisConnAdmin);
});
#endregion Private Fields
#region Private Properties
/// <summary>
/// Oggetto currentDb locale
/// </summary>
private IDatabase _currDB { get; set; }
#endregion Private Properties
#region Private Methods
/// <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);
}
/// <summary>
/// Init accesso MongoDb
/// </summary>
private void setupMongo()
{
currMongoClient = new MongoClient(mongoConnString);
}
#endregion Private Methods
} }
} }
Binary file not shown.
+17 -19
View File
@@ -1,33 +1,31 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Crc32C.NET" version="1.0.5.0" targetFramework="net462" /> <package id="DnsClient" version="1.6.0" targetFramework="net462" />
<package id="DnsClient" version="1.4.0" targetFramework="net462" /> <package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" targetFramework="net462" /> <package id="MongoDB.Bson" version="2.15.0" targetFramework="net462" />
<package id="MongoDB.Bson" version="2.12.0" targetFramework="net462" /> <package id="MongoDB.Driver" version="2.15.0" targetFramework="net462" />
<package id="MongoDB.Driver" version="2.12.0" targetFramework="net462" /> <package id="MongoDB.Driver.Core" version="2.15.0" targetFramework="net462" />
<package id="MongoDB.Driver.Core" version="2.12.0" targetFramework="net462" /> <package id="MongoDB.Libmongocrypt" version="1.3.0" targetFramework="net462" />
<package id="MongoDB.LibMongocrypt" version="1.2.0" targetFramework="net462" /> <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net462" /> <package id="NLog" version="5.2.4" targetFramework="net462" />
<package id="NLog" version="4.7.8" targetFramework="net462" /> <package id="Pipelines.Sockets.Unofficial" version="2.2.2" targetFramework="net462" />
<package id="Pipelines.Sockets.Unofficial" version="2.2.0" targetFramework="net462" /> <package id="SharpCompress" version="0.31.0" targetFramework="net462" />
<package id="SharpCompress" version="0.28.1" targetFramework="net462" /> <package id="SharpZipLib" version="1.3.3" targetFramework="net462" />
<package id="SharpZipLib" version="1.3.1" targetFramework="net462" /> <package id="StackExchange.Redis" version="2.5.61" targetFramework="net462" />
<package id="Snappy.NET" version="1.1.1.8" targetFramework="net462" />
<package id="StackExchange.Redis" version="2.2.4" targetFramework="net462" />
<package id="System.Buffers" version="4.5.1" targetFramework="net462" /> <package id="System.Buffers" version="4.5.1" targetFramework="net462" />
<package id="System.Diagnostics.PerformanceCounter" version="5.0.1" targetFramework="net462" /> <package id="System.Diagnostics.PerformanceCounter" version="6.0.1" targetFramework="net462" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net462" /> <package id="System.IO.Compression" version="4.3.0" targetFramework="net462" />
<package id="System.IO.Pipelines" version="5.0.1" targetFramework="net462" /> <package id="System.IO.Pipelines" version="6.0.2" targetFramework="net462" />
<package id="System.Memory" version="4.5.4" targetFramework="net462" /> <package id="System.Memory" version="4.5.4" targetFramework="net462" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net462" /> <package id="System.Net.Http" version="4.3.4" targetFramework="net462" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" /> <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" />
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net462" /> <package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net462" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net462" /> <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net462" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net462" /> <package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net462" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net462" /> <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net462" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net462" /> <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net462" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net462" /> <package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net462" />
<package id="System.Text.Encoding.CodePages" version="5.0.0" targetFramework="net462" /> <package id="System.Text.Encoding.CodePages" version="6.0.0" targetFramework="net462" />
<package id="System.Threading.Channels" version="5.0.0" targetFramework="net462" /> <package id="System.Threading.Channels" version="6.0.0" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" /> <package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
</packages> </packages>
+6
View File
@@ -0,0 +1,6 @@
- name: Articles
href: articles/
- name: API Documentation
href: obj/api/
homepage: api/index.md
@@ -1,5 +1,5 @@
--------------------------------------------------------------- ---------------------------------------------------------------
------- SteamWareLib SDK ------- ------- SteamWare SDK -------
--------------------------------------------------------------- ---------------------------------------------------------------
Libreria di utility base di SteamWare. Libreria di utility base di SteamWare.
@@ -19,13 +19,13 @@
<targets async="true"> <targets async="true">
<target xsi:type="File" <target xsi:type="File"
name="SteamWareLib" name="SteamWare"
fileName="${basedir}/logs/${shortdate}-SteamWare.log" fileName="${basedir}/logs/${shortdate}-SteamWare.log"
layout="${longdate} ${uppercase:${level}} ${message}" layout="${longdate} ${uppercase:${level}} ${message}"
/> />
</targets> </targets>
<rules> <rules>
<logger name="SteamWare.*" minlevel="Debug" writeTo="SteamWareLib" /> <logger name="SteamWare.*" minlevel="Debug" writeTo="SteamWare" />
</rules> </rules>
</nlog> </nlog>
+3 -3
View File
@@ -31,8 +31,8 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.5.2.4\lib\net46\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
@@ -49,7 +49,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\SteamWareLib\SteamWare.cs"> <Compile Include="..\SteamWare\SteamWare.cs">
<Link>SteamWare.cs</Link> <Link>SteamWare.cs</Link>
</Compile> </Compile>
<Compile Include="Constants.cs" /> <Compile Include="Constants.cs" />
+4
View File
@@ -0,0 +1,4 @@
# SteamWare.Logger
Impiegare il men&ugrave; laterale per navigare nel codice del progetto.
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
# SteamWare.Logger:
Libreria x gestione Logging
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
#[Introduction](intro.md)
+68
View File
@@ -0,0 +1,68 @@
{
"metadata": [
{
"src": [
{
"files": [
"*.csproj"
],
"cwd": ".",
"exclude": [
"**/obj/**",
"**/bin/**",
"_site/**"
]
}
],
"dest": "obj/api"
}
],
"build": {
"content": [
{
"files": [
"api/**.yml"
],
"cwd": "obj"
},
{
"files": [
"api/*.md",
"articles/**.md",
"toc.yml",
"*.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"resource": [
{
"files": [
"images/**"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"overwrite": [
{
"files": [
"apidoc/**.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"dest": "_site",
"template": [
"default"
]
}
}
+13
View File
@@ -0,0 +1,13 @@
# SteamWare.Logger
Documentazione relativa alla libreria SteamWare.Logger.
Vedere la sezione Articles per maggiori informazioni sulle definizioni, l'impiego ed esempi.
## Articles
Per maggiori dettagli, definizioni e demo funzionamento si rimanda alla sezione Articles
## Api
Per ogni dettaglio e riferimento alla libreria si rimanda alla sezione Api Documentation
Binary file not shown.
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.7.8" targetFramework="net462" /> <package id="NLog" version="5.2.4" targetFramework="net462" />
</packages> </packages>
+6
View File
@@ -0,0 +1,6 @@
- name: Articles
href: articles/
- name: API Documentation
href: obj/api/
homepage: api/index.md
+1 -1
View File
@@ -46,7 +46,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\SteamWareLib\SteamWare.cs"> <Compile Include="..\SteamWare\SteamWare.cs">
<Link>SteamWare.cs</Link> <Link>SteamWare.cs</Link>
</Compile> </Compile>
<Compile Include="devInfoParam.cs" /> <Compile Include="devInfoParam.cs" />
+3
View File
@@ -0,0 +1,3 @@
# SteamWare.Reports
Impiegare il men&ugrave; laterale per navigare nel codice del progetto.
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
# SteamWare.Reports:
Libreria x gestione export/salvataggio/stampaReport con viewer di Reporting Services
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
#[Introduction](intro.md)
+68
View File
@@ -0,0 +1,68 @@
{
"metadata": [
{
"src": [
{
"files": [
"*.csproj"
],
"cwd": ".",
"exclude": [
"**/obj/**",
"**/bin/**",
"_site/**"
]
}
],
"dest": "obj/api"
}
],
"build": {
"content": [
{
"files": [
"api/**.yml"
],
"cwd": "obj"
},
{
"files": [
"api/*.md",
"articles/**.md",
"toc.yml",
"*.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"resource": [
{
"files": [
"images/**"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"overwrite": [
{
"files": [
"apidoc/**.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"dest": "_site",
"template": [
"default"
]
}
}
+13
View File
@@ -0,0 +1,13 @@
# SteamWare.Reports
Documentazione relativa alla libreria SteamWare.Reports.
Vedere la sezione Articles per maggiori informazioni sulle definizioni, l'impiego ed esempi.
## Articles
Per maggiori dettagli, definizioni e demo funzionamento si rimanda alla sezione Articles
## Api
Per ogni dettaglio e riferimento alla libreria si rimanda alla sezione Api Documentation
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
- name: Articles
href: articles/
- name: API Documentation
href: obj/api/
homepage: api/index.md
+17 -15
View File
@@ -1,10 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 17
VisualStudioVersion = 16.0.29306.81 VisualStudioVersion = 17.1.32228.430
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamWare", "SteamWareLib\SteamWare.csproj", "{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestBench", "TestBench\TestBench.csproj", "{C406C4DA-29D6-4B6B-A87B-F5E10F6DB9DA}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestBench", "TestBench\TestBench.csproj", "{C406C4DA-29D6-4B6B-A87B-F5E10F6DB9DA}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamWare.Reports", "SteamWare.Reports\SteamWare.Reports.csproj", "{1792D70C-D854-415B-ACF1-76BBCB8AC6FE}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamWare.Reports", "SteamWare.Reports\SteamWare.Reports.csproj", "{1792D70C-D854-415B-ACF1-76BBCB8AC6FE}"
@@ -13,13 +11,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamWare.IO", "SteamWare.I
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamWare.Logger", "SteamWare.Logger\SteamWare.Logger.csproj", "{97A9F482-C173-4F0F-9F8F-7BB41C59CDD6}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamWare.Logger", "SteamWare.Logger\SteamWare.Logger.csproj", "{97A9F482-C173-4F0F-9F8F-7BB41C59CDD6}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Steamware.Scheduler", "Steamware.Scheduler\Steamware.Scheduler.csproj", "{8901AFAC-987A-40C9-B730-D1FDE0E5170C}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamWare.Scheduler", "SteamWare.Scheduler\SteamWare.Scheduler.csproj", "{8901AFAC-987A-40C9-B730-D1FDE0E5170C}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D288348A-1636-463B-B803-0ED937EA54ED}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D288348A-1636-463B-B803-0ED937EA54ED}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig .editorconfig = .editorconfig
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamWare", "SteamWare\SteamWare.csproj", "{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|.NET = Debug|.NET Debug|.NET = Debug|.NET
@@ -30,16 +30,6 @@ Global
Release|Mixed Platforms = Release|Mixed Platforms Release|Mixed Platforms = Release|Mixed Platforms
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|.NET.ActiveCfg = Debug|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|.NET.ActiveCfg = Release|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Any CPU.Build.0 = Release|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C406C4DA-29D6-4B6B-A87B-F5E10F6DB9DA}.Debug|.NET.ActiveCfg = Debug|Any CPU {C406C4DA-29D6-4B6B-A87B-F5E10F6DB9DA}.Debug|.NET.ActiveCfg = Debug|Any CPU
{C406C4DA-29D6-4B6B-A87B-F5E10F6DB9DA}.Debug|.NET.Build.0 = Debug|Any CPU {C406C4DA-29D6-4B6B-A87B-F5E10F6DB9DA}.Debug|.NET.Build.0 = Debug|Any CPU
{C406C4DA-29D6-4B6B-A87B-F5E10F6DB9DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C406C4DA-29D6-4B6B-A87B-F5E10F6DB9DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -100,6 +90,18 @@ Global
{8901AFAC-987A-40C9-B730-D1FDE0E5170C}.Release|Any CPU.Build.0 = Release|Any CPU {8901AFAC-987A-40C9-B730-D1FDE0E5170C}.Release|Any CPU.Build.0 = Release|Any CPU
{8901AFAC-987A-40C9-B730-D1FDE0E5170C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {8901AFAC-987A-40C9-B730-D1FDE0E5170C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{8901AFAC-987A-40C9-B730-D1FDE0E5170C}.Release|Mixed Platforms.Build.0 = Release|Any CPU {8901AFAC-987A-40C9-B730-D1FDE0E5170C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|.NET.ActiveCfg = Debug|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|.NET.Build.0 = Debug|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|.NET.ActiveCfg = Release|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|.NET.Build.0 = Release|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Any CPU.Build.0 = Release|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@@ -19,13 +19,13 @@
<targets async="true"> <targets async="true">
<target xsi:type="File" <target xsi:type="File"
name="SteamWareLib" name="SteamWare"
fileName="${basedir}/logs/${shortdate}-SteamWare.log" fileName="${basedir}/logs/${shortdate}-SteamWare.log"
layout="${longdate} ${uppercase:${level}} ${message}" layout="${longdate} ${uppercase:${level}} ${message}"
/> />
</targets> </targets>
<rules> <rules>
<logger name="SteamWare.*" minlevel="Debug" writeTo="SteamWareLib" /> <logger name="SteamWare.*" minlevel="Debug" writeTo="SteamWare" />
</rules> </rules>
</nlog> </nlog>
@@ -2,8 +2,10 @@
_adminEmail samuele@steamware.net,info@steamware.net samuele@steamware.net,info@steamware.net info@steamware.net _adminEmail samuele@steamware.net,info@steamware.net samuele@steamware.net,info@steamware.net info@steamware.net
_allowForceUser true true abilita login forzato _allowForceUser true true abilita login forzato
_commonPages menu menu pagina comune _commonPages menu menu pagina comune
_emailPwd drmfsls16 drmfsls16 drmfsls16 _emailPwd siamoInViaNazionale93 siamoInViaNazionale93 siamoInViaNazionale93
_emailUser steamwarebot@gmail.com steamwarebot@gmail.com steamwarebot@gmail.com _emailUser steamwarebot@outlook.it steamwarebot@outlook.it steamwarebot@outlook.it
_smtpCli smtp-mail.outlook.com smtp-mail.outlook.com smtp-mail.outlook.com
_fromEmail steamwarebot@outlook.it steamwarebot@outlook.it steamwarebot@outlook.it
_enableSSL true true true _enableSSL true true true
_fromEmail webmaster@admodelling.org webmaster@admodelling.org email mittente eventuali msg _fromEmail webmaster@admodelling.org webmaster@admodelling.org email mittente eventuali msg
_righeDataGrid 30 30 Num righe datagrid std _righeDataGrid 30 30 Num righe datagrid std
@@ -1,3 +1,6 @@
using NLog;
using System;
namespace SteamWare namespace SteamWare
{ {
/// <summary> /// <summary>
@@ -5,43 +8,22 @@ namespace SteamWare
/// </summary> /// </summary>
public class ApplicationSimplePage : System.Web.UI.Page public class ApplicationSimplePage : System.Web.UI.Page
{ {
#region Public Constructors
/// <summary> /// <summary>
/// Iniziazlizzazione void (non fa nulla) /// Iniziazlizzazione void (non fa nulla)
/// </summary> /// </summary>
protected ApplicationSimplePage() public ApplicationSimplePage()
{ }
#region area public
#endregion
#region flusso creazione pagina =c=
/// <summary>
/// Metodo MAIN: viene eseguita al caricamento ed effettua delle routines per il controllo utente e istanzia l'oggetto memLayer
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected virtual void Page_Load(object sender, System.EventArgs e)
{ {
if (Log == null)
{
Log = LogManager.GetCurrentClassLogger();
}
} }
#endregion Public Constructors
#endregion #region Public Methods
#region utility =c=
/// <summary>
/// rimanda alla pagina di Work In Progress salvando in session un titolo ed una descrizione che al pagina wip poi mostrerà all'utente
/// </summary>
/// <param name="titoloWIP">titolo da mostrare nella pagina WIP</param>
/// <param name="descrizioneWIP">descrizione da mostrare nella pagina WIP</param>
protected void paginaWIP(string titoloWIP, string descrizioneWIP)
{
Session["titoloWIP"] = titoloWIP;
Session["descrizioneWIP"] = descrizioneWIP;
Response.Redirect("WIP.aspx");
}
/// <summary> /// <summary>
/// wrapper per log con salvataggio dell'IP del chiamante /// wrapper per log con salvataggio dell'IP del chiamante
@@ -56,11 +38,14 @@ namespace SteamWare
{ {
postazione_IP = string.Format(" | {0} | ", Request.UserHostName); postazione_IP = string.Format(" | {0} | ", Request.UserHostName);
} }
catch catch (Exception exc)
{ } {
logger.lg.scriviLog(postazione_IP + _testoPre); Log.Error($"Eccezione in httpLog01{Environment.NewLine}{exc}");
}
Log.Info(postazione_IP + _testoPre);
return answ; return answ;
} }
/// <summary> /// <summary>
/// wrapper per log con salvataggio dell'IP del chiamante /// wrapper per log con salvataggio dell'IP del chiamante
/// </summary> /// </summary>
@@ -75,13 +60,47 @@ namespace SteamWare
{ {
postazione_IP = string.Format(" | {0} | ", Request.UserHostName); postazione_IP = string.Format(" | {0} | ", Request.UserHostName);
} }
catch catch (Exception exc)
{ } {
logger.lg.scriviLog(postazione_IP + testoLog, tipo); Log.Error($"Eccezione in httpLog02{Environment.NewLine}{exc}");
}
Log.Info(postazione_IP + testoLog, tipo);
return answ; return answ;
} }
#endregion
#endregion Public Methods
#region Protected Methods
/// <summary>
/// Metodo MAIN: viene eseguita al caricamento ed effettua delle routines per il controllo
/// utente e istanzia l'oggetto memLayer
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected virtual void Page_Load(object sender, System.EventArgs e)
{
}
/// <summary>
/// rimanda alla pagina di Work In Progress salvando in session un titolo ed una descrizione
/// che al pagina wip poi mostrerà all'utente
/// </summary>
/// <param name="titoloWIP">titolo da mostrare nella pagina WIP</param>
/// <param name="descrizioneWIP">descrizione da mostrare nella pagina WIP</param>
protected void paginaWIP(string titoloWIP, string descrizioneWIP)
{
Session["titoloWIP"] = titoloWIP;
Session["descrizioneWIP"] = descrizioneWIP;
Response.Redirect("WIP.aspx");
}
#endregion Protected Methods
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
} }
} }
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -246,6 +246,18 @@ SELECT chiave, valore, valoreStd, note FROM Config WHERE (chiave = @chiave)</Com
</DbCommand> </DbCommand>
</SelectCommand> </SelectCommand>
</DbSource> </DbSource>
<DbSource ConnectionRef="DbConfConnectionString (Settings)" DbObjectName="MoonPro.dbo.stp_config_updateQuery" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="updateQuery" Modifier="Public" Name="updateQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="updateQuery">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_config_updateQuery</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@chiave" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@valore" Precision="0" ProviderType="NVarChar" Scale="0" Size="250" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
</Sources> </Sources>
</TableAdapter> </TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ConfigTmpTableAdapter" GeneratorDataComponentClassName="ConfigTmpTableAdapter" Name="ConfigTmp" UserDataComponentName="ConfigTmpTableAdapter"> <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ConfigTmpTableAdapter" GeneratorDataComponentClassName="ConfigTmpTableAdapter" Name="ConfigTmp" UserDataComponentName="ConfigTmpTableAdapter">
@@ -349,55 +361,55 @@ SELECT sorgente, chiave, valore, note FROM ConfigTmp WHERE (chiave = @chiave) AN
</DataSource> </DataSource>
</xs:appinfo> </xs:appinfo>
</xs:annotation> </xs:annotation>
<xs:element name="DS_Utility" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DS_Utility" msprop:Generator_UserDSName="DS_Utility"> <xs:element name="DS_Utility" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_UserDSName="DS_Utility" msprop:Generator_DataSetName="DS_Utility">
<xs:complexType> <xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ListValues" msprop:Generator_TableClassName="ListValuesDataTable" msprop:Generator_TableVarName="tableListValues" msprop:Generator_RowChangedName="ListValuesRowChanged" msprop:Generator_TablePropName="ListValues" msprop:Generator_RowDeletingName="ListValuesRowDeleting" msprop:Generator_RowChangingName="ListValuesRowChanging" msprop:Generator_RowEvHandlerName="ListValuesRowChangeEventHandler" msprop:Generator_RowDeletedName="ListValuesRowDeleted" msprop:Generator_RowClassName="ListValuesRow" msprop:Generator_UserTableName="ListValues" msprop:Generator_RowEvArgName="ListValuesRowChangeEvent"> <xs:element name="ListValues" msprop:Generator_RowEvHandlerName="ListValuesRowChangeEventHandler" msprop:Generator_RowDeletedName="ListValuesRowDeleted" msprop:Generator_RowDeletingName="ListValuesRowDeleting" msprop:Generator_RowEvArgName="ListValuesRowChangeEvent" msprop:Generator_TablePropName="ListValues" msprop:Generator_RowChangedName="ListValuesRowChanged" msprop:Generator_RowChangingName="ListValuesRowChanging" msprop:Generator_TableClassName="ListValuesDataTable" msprop:Generator_RowClassName="ListValuesRow" msprop:Generator_TableVarName="tableListValues" msprop:Generator_UserTableName="ListValues">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="TableName" msprop:Generator_ColumnVarNameInTable="columnTableName" msprop:Generator_ColumnPropNameInRow="TableName" msprop:Generator_ColumnPropNameInTable="TableNameColumn" msprop:Generator_UserColumnName="TableName"> <xs:element name="TableName" msprop:Generator_ColumnPropNameInRow="TableName" msprop:Generator_ColumnPropNameInTable="TableNameColumn" msprop:Generator_ColumnVarNameInTable="columnTableName" msprop:Generator_UserColumnName="TableName">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="FieldName" msprop:Generator_ColumnVarNameInTable="columnFieldName" msprop:Generator_ColumnPropNameInRow="FieldName" msprop:Generator_ColumnPropNameInTable="FieldNameColumn" msprop:Generator_UserColumnName="FieldName"> <xs:element name="FieldName" msprop:Generator_ColumnPropNameInRow="FieldName" msprop:Generator_ColumnPropNameInTable="FieldNameColumn" msprop:Generator_ColumnVarNameInTable="columnFieldName" msprop:Generator_UserColumnName="FieldName">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="value" msprop:Generator_ColumnVarNameInTable="columnvalue" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnPropNameInTable="valueColumn" msprop:Generator_UserColumnName="value"> <xs:element name="value" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnPropNameInTable="valueColumn" msprop:Generator_ColumnVarNameInTable="columnvalue" msprop:Generator_UserColumnName="value">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="10" /> <xs:maxLength value="10" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="label" msprop:Generator_ColumnVarNameInTable="columnlabel" msprop:Generator_ColumnPropNameInRow="label" msprop:Generator_ColumnPropNameInTable="labelColumn" msprop:Generator_UserColumnName="label" minOccurs="0"> <xs:element name="label" msprop:Generator_ColumnPropNameInRow="label" msprop:Generator_ColumnPropNameInTable="labelColumn" msprop:Generator_ColumnVarNameInTable="columnlabel" msprop:Generator_UserColumnName="label" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="ordinal" msprop:Generator_ColumnVarNameInTable="columnordinal" msprop:Generator_ColumnPropNameInRow="ordinal" msprop:Generator_ColumnPropNameInTable="ordinalColumn" msprop:Generator_UserColumnName="ordinal" type="xs:int" minOccurs="0" /> <xs:element name="ordinal" msprop:Generator_ColumnPropNameInRow="ordinal" msprop:Generator_ColumnPropNameInTable="ordinalColumn" msprop:Generator_ColumnVarNameInTable="columnordinal" msprop:Generator_UserColumnName="ordinal" type="xs:int" minOccurs="0" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="v_selListVal" msprop:Generator_TableClassName="v_selListValDataTable" msprop:Generator_TableVarName="tablev_selListVal" msprop:Generator_RowChangedName="v_selListValRowChanged" msprop:Generator_TablePropName="v_selListVal" msprop:Generator_RowDeletingName="v_selListValRowDeleting" msprop:Generator_RowChangingName="v_selListValRowChanging" msprop:Generator_RowEvHandlerName="v_selListValRowChangeEventHandler" msprop:Generator_RowDeletedName="v_selListValRowDeleted" msprop:Generator_RowClassName="v_selListValRow" msprop:Generator_UserTableName="v_selListVal" msprop:Generator_RowEvArgName="v_selListValRowChangeEvent"> <xs:element name="v_selListVal" msprop:Generator_RowEvHandlerName="v_selListValRowChangeEventHandler" msprop:Generator_RowDeletedName="v_selListValRowDeleted" msprop:Generator_RowDeletingName="v_selListValRowDeleting" msprop:Generator_RowEvArgName="v_selListValRowChangeEvent" msprop:Generator_TablePropName="v_selListVal" msprop:Generator_RowChangedName="v_selListValRowChanged" msprop:Generator_RowChangingName="v_selListValRowChanging" msprop:Generator_TableClassName="v_selListValDataTable" msprop:Generator_RowClassName="v_selListValRow" msprop:Generator_TableVarName="tablev_selListVal" msprop:Generator_UserTableName="v_selListVal">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="value" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnvalue" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnPropNameInTable="valueColumn" msprop:Generator_UserColumnName="value" minOccurs="0"> <xs:element name="value" msdata:ReadOnly="true" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnPropNameInTable="valueColumn" msprop:Generator_ColumnVarNameInTable="columnvalue" msprop:Generator_UserColumnName="value" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="112" /> <xs:maxLength value="112" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="label" msprop:Generator_ColumnVarNameInTable="columnlabel" msprop:Generator_ColumnPropNameInRow="label" msprop:Generator_ColumnPropNameInTable="labelColumn" msprop:Generator_UserColumnName="label" minOccurs="0"> <xs:element name="label" msprop:Generator_ColumnPropNameInRow="label" msprop:Generator_ColumnPropNameInTable="labelColumn" msprop:Generator_ColumnVarNameInTable="columnlabel" msprop:Generator_UserColumnName="label" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
@@ -407,31 +419,31 @@ SELECT sorgente, chiave, valore, note FROM ConfigTmp WHERE (chiave = @chiave) AN
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="Config" msprop:Generator_TableClassName="ConfigDataTable" msprop:Generator_TableVarName="tableConfig" msprop:Generator_TablePropName="Config" msprop:Generator_RowDeletingName="ConfigRowDeleting" msprop:Generator_RowChangingName="ConfigRowChanging" msprop:Generator_RowEvHandlerName="ConfigRowChangeEventHandler" msprop:Generator_RowDeletedName="ConfigRowDeleted" msprop:Generator_UserTableName="Config" msprop:Generator_RowChangedName="ConfigRowChanged" msprop:Generator_RowEvArgName="ConfigRowChangeEvent" msprop:Generator_RowClassName="ConfigRow"> <xs:element name="Config" msprop:Generator_RowClassName="ConfigRow" msprop:Generator_RowEvHandlerName="ConfigRowChangeEventHandler" msprop:Generator_RowDeletedName="ConfigRowDeleted" msprop:Generator_RowDeletingName="ConfigRowDeleting" msprop:Generator_RowEvArgName="ConfigRowChangeEvent" msprop:Generator_TablePropName="Config" msprop:Generator_RowChangedName="ConfigRowChanged" msprop:Generator_RowChangingName="ConfigRowChanging" msprop:Generator_TableClassName="ConfigDataTable" msprop:Generator_UserTableName="Config" msprop:Generator_TableVarName="tableConfig">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="chiave" msprop:Generator_ColumnVarNameInTable="columnchiave" msprop:Generator_ColumnPropNameInRow="chiave" msprop:Generator_ColumnPropNameInTable="chiaveColumn" msprop:Generator_UserColumnName="chiave"> <xs:element name="chiave" msprop:Generator_ColumnPropNameInRow="chiave" msprop:Generator_ColumnPropNameInTable="chiaveColumn" msprop:Generator_ColumnVarNameInTable="columnchiave" msprop:Generator_UserColumnName="chiave">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="valore" msprop:Generator_ColumnVarNameInTable="columnvalore" msprop:Generator_ColumnPropNameInRow="valore" msprop:Generator_ColumnPropNameInTable="valoreColumn" msprop:Generator_UserColumnName="valore" minOccurs="0"> <xs:element name="valore" msprop:Generator_ColumnPropNameInRow="valore" msprop:Generator_ColumnPropNameInTable="valoreColumn" msprop:Generator_ColumnVarNameInTable="columnvalore" msprop:Generator_UserColumnName="valore" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="2147483647" /> <xs:maxLength value="2147483647" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="valoreStd" msprop:Generator_ColumnVarNameInTable="columnvaloreStd" msprop:Generator_ColumnPropNameInRow="valoreStd" msprop:Generator_ColumnPropNameInTable="valoreStdColumn" msprop:Generator_UserColumnName="valoreStd" minOccurs="0"> <xs:element name="valoreStd" msprop:Generator_ColumnPropNameInRow="valoreStd" msprop:Generator_ColumnPropNameInTable="valoreStdColumn" msprop:Generator_ColumnVarNameInTable="columnvaloreStd" msprop:Generator_UserColumnName="valoreStd" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="2147483647" /> <xs:maxLength value="2147483647" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="note" msprop:Generator_ColumnVarNameInTable="columnnote" msprop:Generator_ColumnPropNameInRow="note" msprop:Generator_ColumnPropNameInTable="noteColumn" msprop:Generator_UserColumnName="note" minOccurs="0"> <xs:element name="note" msprop:Generator_ColumnPropNameInRow="note" msprop:Generator_ColumnPropNameInTable="noteColumn" msprop:Generator_ColumnVarNameInTable="columnnote" msprop:Generator_UserColumnName="note" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="2147483647" /> <xs:maxLength value="2147483647" />
@@ -441,31 +453,31 @@ SELECT sorgente, chiave, valore, note FROM ConfigTmp WHERE (chiave = @chiave) AN
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="ConfigTmp" msprop:Generator_TableClassName="ConfigTmpDataTable" msprop:Generator_TableVarName="tableConfigTmp" msprop:Generator_RowChangedName="ConfigTmpRowChanged" msprop:Generator_TablePropName="ConfigTmp" msprop:Generator_RowDeletingName="ConfigTmpRowDeleting" msprop:Generator_RowChangingName="ConfigTmpRowChanging" msprop:Generator_RowEvHandlerName="ConfigTmpRowChangeEventHandler" msprop:Generator_RowDeletedName="ConfigTmpRowDeleted" msprop:Generator_RowClassName="ConfigTmpRow" msprop:Generator_UserTableName="ConfigTmp" msprop:Generator_RowEvArgName="ConfigTmpRowChangeEvent"> <xs:element name="ConfigTmp" msprop:Generator_RowEvHandlerName="ConfigTmpRowChangeEventHandler" msprop:Generator_RowDeletedName="ConfigTmpRowDeleted" msprop:Generator_RowDeletingName="ConfigTmpRowDeleting" msprop:Generator_RowEvArgName="ConfigTmpRowChangeEvent" msprop:Generator_TablePropName="ConfigTmp" msprop:Generator_RowChangedName="ConfigTmpRowChanged" msprop:Generator_RowChangingName="ConfigTmpRowChanging" msprop:Generator_TableClassName="ConfigTmpDataTable" msprop:Generator_RowClassName="ConfigTmpRow" msprop:Generator_TableVarName="tableConfigTmp" msprop:Generator_UserTableName="ConfigTmp">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="sorgente" msprop:Generator_ColumnVarNameInTable="columnsorgente" msprop:Generator_ColumnPropNameInRow="sorgente" msprop:Generator_ColumnPropNameInTable="sorgenteColumn" msprop:Generator_UserColumnName="sorgente"> <xs:element name="sorgente" msprop:Generator_ColumnPropNameInRow="sorgente" msprop:Generator_ColumnPropNameInTable="sorgenteColumn" msprop:Generator_ColumnVarNameInTable="columnsorgente" msprop:Generator_UserColumnName="sorgente">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="chiave" msprop:Generator_ColumnVarNameInTable="columnchiave" msprop:Generator_ColumnPropNameInRow="chiave" msprop:Generator_ColumnPropNameInTable="chiaveColumn" msprop:Generator_UserColumnName="chiave"> <xs:element name="chiave" msprop:Generator_ColumnPropNameInRow="chiave" msprop:Generator_ColumnPropNameInTable="chiaveColumn" msprop:Generator_ColumnVarNameInTable="columnchiave" msprop:Generator_UserColumnName="chiave">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="valore" msprop:Generator_ColumnVarNameInTable="columnvalore" msprop:Generator_ColumnPropNameInRow="valore" msprop:Generator_ColumnPropNameInTable="valoreColumn" msprop:Generator_UserColumnName="valore"> <xs:element name="valore" msprop:Generator_ColumnPropNameInRow="valore" msprop:Generator_ColumnPropNameInTable="valoreColumn" msprop:Generator_ColumnVarNameInTable="columnvalore" msprop:Generator_UserColumnName="valore">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="250" /> <xs:maxLength value="250" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="note" msprop:Generator_ColumnVarNameInTable="columnnote" msprop:Generator_ColumnPropNameInRow="note" msprop:Generator_ColumnPropNameInTable="noteColumn" msprop:Generator_UserColumnName="note"> <xs:element name="note" msprop:Generator_ColumnPropNameInRow="note" msprop:Generator_ColumnPropNameInTable="noteColumn" msprop:Generator_ColumnVarNameInTable="columnnote" msprop:Generator_UserColumnName="note">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="250" /> <xs:maxLength value="250" />
@@ -4,11 +4,11 @@
Changes to this file may cause incorrect behavior and will be lost if Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated. the code is regenerated.
</autogenerated>--> </autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="54" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout"> <DiagramLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="54" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes> <Shapes>
<Shape ID="DesignTable:ListValues" ZOrder="4" X="70" Y="70" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" /> <Shape ID="DesignTable:ListValues" ZOrder="4" X="70" Y="70" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:v_selListVal" ZOrder="3" X="713" Y="90" Height="181" Width="259" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="76" /> <Shape ID="DesignTable:v_selListVal" ZOrder="3" X="713" Y="90" Height="181" Width="259" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="76" />
<Shape ID="DesignTable:Config" ZOrder="1" X="989" Y="95" Height="172" Width="183" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" /> <Shape ID="DesignTable:Config" ZOrder="1" X="989" Y="95" Height="191" Width="219" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:ConfigTmp" ZOrder="2" X="388" Y="78" Height="250" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="122" /> <Shape ID="DesignTable:ConfigTmp" ZOrder="2" X="388" Y="78" Height="250" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="122" />
</Shapes> </Shapes>
<Connectors /> <Connectors />
+344
View File
@@ -0,0 +1,344 @@
using Newtonsoft.Json;
using NLog;
using System;
using System.Collections.Generic;
namespace SteamWare
{
/// <summary>
/// classe di wrap verso i TableAdapter impiegati
/// </summary>
public class DataWrap
{
#region Public Fields
/// <summary>
/// classe singleton x la gestione dei tableadapters
/// </summary>
public static DataWrap DW = new DataWrap();
/// <summary>
/// oggetto vocabolario organizzato come dizionario con chiave lang#lemma e valore la traduzione
/// </summary>
public Dictionary<string, string> dictVocabolario;
/// <summary>
/// table adapter Devices utente
/// </summary>
public DS_devicesTableAdapters.AnagDevicesTableAdapter taAnagDev;
/// <summary>
/// tableAdapter CdC
/// </summary>
public DataLayer_AnagGenTableAdapters.CDCTableAdapter taCdc;
/// <summary>
/// tableAdapter diritti
/// </summary>
public DataLayer_AnagGenTableAdapters.DIRITTITableAdapter taDiritti;
/// <summary>
/// tableAdapter funzione
/// </summary>
public DataLayer_AnagGenTableAdapters.FUNZIONETableAdapter taFunzione;
/// <summary>
/// table adapter lingue
/// </summary>
public DataLayer_genericTableAdapters.LingueTableAdapter taLingue;
/// <summary>
/// table adapter versione anagrafica
/// </summary>
public DataLayer_AnagGenTableAdapters.LogUpdateDbTableAdapter taLogAna;
/// <summary>
/// table adapter versione vocabolario
/// </summary>
public DataLayer_genericTableAdapters.LogUpdateDbTableAdapter taLogVoc;
/// <summary>
/// tableAdapter permessi
/// </summary>
public DataLayer_AnagGenTableAdapters.PermessiTableAdapter taPermessi;
/// <summary>
/// tableAdapter permessi2funzione
/// </summary>
public DataLayer_AnagGenTableAdapters.Permessi2FunzioneTableAdapter taPermessi2Funzione;
/// <summary>
/// tableAdapter userData (user/pwd)
/// </summary>
public DataLayer_AnagGenTableAdapters.UserDataTableAdapter taUserData;
/// <summary>
/// tableAdapter userDataExt (user/pwd)
/// </summary>
public DataLayer_AnagGenTableAdapters.UserDataExtTableAdapter taUserDataExt;
/// <summary>
/// tableAdapter utenti
/// </summary>
public DataLayer_AnagGenTableAdapters.UTENTETableAdapter taUtente;
/// <summary>
/// table adapter vocabolario
/// </summary>
public DataLayer_genericTableAdapters.VocabolarioTableAdapter taVocabolario;
#endregion Public Fields
#region Public Constructors
/// <summary>
/// metodo protected di avvio della classe
/// </summary>
public DataWrap()
{
if (Log == null)
{
Log = LogManager.GetCurrentClassLogger();
}
// inizializzo i table adapters
avvioTableAdaptersBase();
setupConnectionStringBase();
avvioTableAdaptersSpec();
setupConnectionStringSpec();
setupVocabolario();
}
#endregion Public Constructors
#region Public Properties
/// <summary>
/// elenco lingue ammesse da vocabolario...
/// </summary>
public DataLayer_generic.LingueDataTable lingue
{
get
{
return taLingue.GetData();
}
}
/// <summary>
/// restituisce conteggio numero record dell'oggetto vocabolario
/// </summary>
public int numRecVoc
{
get
{
int answ = 0;
try
{
answ = dictVocabolario.Count;
}
catch
{ }
return answ;
}
}
/// <summary>
/// Verifica se il vocabolario sia ok...
/// </summary>
public bool vocabolarioOk
{
get
{
bool answ = false;
try
{
answ = (dictVocabolario != null);
if (answ)
{
answ = dictVocabolario.Count > 0;
}
}
catch
{ }
return answ;
}
}
#endregion Public Properties
#region Public Methods
/// <summary>
/// crea nel db corrente il lemma richiesto e lo valorizza come "--{0}--"
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public void creaNuovoLemmaVoc(string lemma)
{
foreach (DataLayer_generic.LingueRow rigaLingua in taLingue.GetData())
{
taVocabolario.Insert(rigaLingua.Lingua, lemma, string.Format("--{0}--", lemma));
}
}
/// <summary>
/// resetta il vocabolario rileggendo i dati...
/// </summary>
public void resetVocabolario()
{
memLayer.ML.emptyCacheVal("dictVocabolario");
setupVocabolario();
}
#endregion Public Methods
#region Protected Methods
/// <summary>
/// procedura di avvio dei tableAdapter
/// </summary>
protected virtual void avvioTableAdaptersBase()
{
taLingue = new DataLayer_genericTableAdapters.LingueTableAdapter();
taVocabolario = new DataLayer_genericTableAdapters.VocabolarioTableAdapter();
taLogVoc = new DataLayer_genericTableAdapters.LogUpdateDbTableAdapter();
}
/// <summary>
/// procedura di avvio dei tableAdapter
/// </summary>
protected virtual void avvioTableAdaptersSpec()
{
taCdc = new DataLayer_AnagGenTableAdapters.CDCTableAdapter();
taDiritti = new DataLayer_AnagGenTableAdapters.DIRITTITableAdapter();
taPermessi = new DataLayer_AnagGenTableAdapters.PermessiTableAdapter();
taFunzione = new DataLayer_AnagGenTableAdapters.FUNZIONETableAdapter();
taPermessi2Funzione = new DataLayer_AnagGenTableAdapters.Permessi2FunzioneTableAdapter();
taUtente = new DataLayer_AnagGenTableAdapters.UTENTETableAdapter();
taUserData = new DataLayer_AnagGenTableAdapters.UserDataTableAdapter();
taUserDataExt = new DataLayer_AnagGenTableAdapters.UserDataExtTableAdapter();
taLogAna = new DataLayer_AnagGenTableAdapters.LogUpdateDbTableAdapter();
taAnagDev = new DS_devicesTableAdapters.AnagDevicesTableAdapter();
}
/// <summary>
/// prende l'oggetto tabVocabolario in ram e lo trasforma in dictionary
/// </summary>
/// <returns></returns>
protected Dictionary<string, string> ricaricaDictVocabolario()
{
// continuo
Dictionary<string, string> answ = new Dictionary<string, string>();
DataLayer_generic.VocabolarioDataTable vocData = new DataLayer_generic.VocabolarioDataTable();
if (taVocabolario == null)
{
vocData = DW.taVocabolario.GetData();
}
else
{
vocData = taVocabolario.GetData();
}
foreach (DataLayer_generic.VocabolarioRow riga in vocData)
{
answ.Add(riga.Lingua.ToUpper() + "#" + riga.Lemma.ToUpper(), riga.Traduzione);
}
return answ;
}
/// <summary>
/// effettua setup dei connection strings da web.config delal singola applicazione
/// </summary>
protected virtual void setupConnectionStringBase()
{
string connStr = memLayer.ML.confReadString("VocabolarioConnectionString");
if (string.IsNullOrEmpty(connStr))
{
Log.Error($"ERRORE | DataWrap.setupConnectionStringBase | VocabolarioConnectionString EMPTY");
}
// connections del db vocabolario
taLingue.Connection.ConnectionString = connStr;
taVocabolario.Connection.ConnectionString = connStr;
taLogVoc.Connection.ConnectionString = connStr;
}
/// <summary>
/// effettua setup dei connection strings da web.config della singola applicazione
/// </summary>
protected virtual void setupConnectionStringSpec()
{
string connStrUt = memLayer.ML.confReadString("UtenteCdcConnectionString");
if (string.IsNullOrEmpty(connStrUt))
{
Log.Error($"ERRORE | DataWrap.setupConnectionStringSpec | UtenteCdcConnectionString EMPTY");
}
string connStrPerm = memLayer.ML.confReadString("PermessiConnectionString");
if (string.IsNullOrEmpty(connStrPerm))
{
Log.Error($"ERRORE | DataWrap.setupConnectionStringSpec | PermessiConnectionString EMPTY");
}
// cambio le connString - db anagrafica principale
taCdc.Connection.ConnectionString = connStrUt;
taDiritti.Connection.ConnectionString = connStrUt;
taFunzione.Connection.ConnectionString = connStrUt;
taUtente.Connection.ConnectionString = connStrUt;
taUserData.Connection.ConnectionString = connStrUt;
taUserDataExt.Connection.ConnectionString = connStrUt;
taLogAna.Connection.ConnectionString = connStrUt;
taAnagDev.Connection.ConnectionString = connStrUt;
// connections del db dell'applicazione
taPermessi.Connection.ConnectionString = connStrPerm;
taPermessi2Funzione.Connection.ConnectionString = connStrPerm;
}
/// <summary>
/// setup delle tabelle vocabolario
/// </summary>
protected void setupVocabolario()
{
string source = "DB";
try
{
if (memLayer.ML.isInCacheObject("dictVocabolario"))
{
if (memLayer.ML.cacheOnRedis)
{
dictVocabolario = JsonConvert.DeserializeObject<Dictionary<string, string>>(memLayer.ML.objCacheObj("dictVocabolario").ToString());
source = "REDIS";
}
else
{
dictVocabolario = (Dictionary<string, string>)memLayer.ML.objCacheObj("dictVocabolario");
source = "CACHE";
}
}
else
{
dictVocabolario = ricaricaDictVocabolario();
if (memLayer.ML.cacheOnRedis)
{
string serVal = JsonConvert.SerializeObject(dictVocabolario);
memLayer.ML.setCacheVal("dictVocabolario", serVal, true);
}
else
{
memLayer.ML.setCacheVal("dictVocabolario", dictVocabolario, true);
}
}
}
catch (Exception exc)
{
Log.Error($"Eccezione 01 durante setupVocabolario:{Environment.NewLine}{exc}");
dictVocabolario = new Dictionary<string, string>();
}
// scrivo quanti lemmi ha caricato!
Log.Info($"setupVocabolario | {source} | Caricati {dictVocabolario.Count} lemmi");
}
#endregion Protected Methods
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
}

Some files were not shown because too many files have changed in this diff Show More