Compare commits

...

43 Commits

Author SHA1 Message Date
Samuele Locatelli c64173efca Merge branch 'release/FixNuspec_07' 2025-09-17 15:22:04 +02:00
Samuele Locatelli cb5ac8d3eb cambio setup procedura fix vers nuget file 2025-09-17 15:20:32 +02:00
Samuele Locatelli 19b86b01bb Merge tag 'FixNuspec_06' into develop
Fix gestione nuget
2025-09-17 15:12:07 +02:00
Samuele Locatelli a2451e5fac Merge branch 'release/FixNuspec_06' 2025-09-17 15:08:11 +02:00
Samuele Locatelli 92e719d45e update prod 2025-09-17 15:07:48 +02:00
Samuele Locatelli 25f39591ee test fix scheduler e main package 2025-09-17 15:03:31 +02:00
Samuele Locatelli e2fc1a19dd fix NU_Type x debug, test nuspec semplificato 2025-09-17 15:00:55 +02:00
Samuele Locatelli 2aa2346c59 test modifica nuspec x steamware 2025-09-17 14:53:13 +02:00
Samuele Locatelli a4019dbbff Merge tag 'FixNuspec_05' into develop
Fix (si spera) condizioni compilazione apcchetti stabili
2025-09-17 12:45:55 +02:00
Samuele Locatelli d6dc601bb0 Merge branch 'release/FixNuspec_05' 2025-09-17 12:45:44 +02:00
Samuele Locatelli 7601b204cb Echo variazione nuspec da controllare 2025-09-17 12:31:12 +02:00
Samuele Locatelli fbd8309e83 Merge tag 'FixNuspec_04' into develop
Fix nuspec pacchetti satellite
2025-09-17 12:14:32 +02:00
Samuele Locatelli b62c75e38d Merge branch 'release/FixNuspec_04' 2025-09-17 12:14:18 +02:00
Samuele Locatelli cdb9ee3544 fix conf nuspec 2025-09-17 12:13:52 +02:00
Samuele Locatelli bbf08d859c Merge tag 'FixNuspec_03' into develop
Fix yaml x install prod
2025-09-17 12:06:45 +02:00
Samuele Locatelli d2eac2f1ca Merge branch 'release/FixNuspec_03' 2025-09-17 12:06:18 +02:00
Samuele Locatelli 403a04c874 Ancora CI/CD update x packages 2025-09-17 12:05:57 +02:00
Samuele Locatelli 9c2febccdb Merge tag 'FixNuspec_02' into develop
Fix nuspec generation da CI/CD
2025-09-17 11:52:36 +02:00
Samuele Locatelli 6a319cd47d Merge branch 'release/FixNuspec_02' 2025-09-17 11:52:20 +02:00
Samuele Locatelli 469dfdf5b9 update steamware x evitare file pdb 2025-09-17 08:14:44 +02:00
Samuele Locatelli 874b2e3df7 Modifica path salvataggio nuget 2025-09-17 08:03:32 +02:00
Samuele Locatelli 0c63284e1d test nuget con altra sintassi 2025-09-17 07:36:04 +02:00
Samuele Locatelli a2ac17177a test nuspec con file dll espliciti 2025-09-16 11:25:53 +02:00
Samuele Locatelli 8cb36423af Merge tag 'FixNuspec_01' into develop
Update nuspec
2025-09-16 10:25:29 +02:00
Samuele Locatelli f3c0a5ebf5 Merge branch 'release/FixNuspec_01' 2025-09-16 10:25:05 +02:00
Samuele Locatelli 9e9a76f770 Fix nuspec conf 2025-09-16 10:21:01 +02:00
Samuele Locatelli acc7392458 Aggiunta step nuget fix 2025-09-16 10:05:03 +02:00
Samuele Locatelli 0d52615776 Maybe fix yaml correzione vers 2025-09-16 10:03:34 +02:00
Samuele Locatelli b10174881d Test CI/CD con fix nuspec 2025-09-16 09:59:18 +02:00
Samuele Locatelli c5ca5727be Aggiunta files nuspec x compilare specifiche 2025-09-16 09:53:37 +02:00
Samuele Locatelli 1fb222c146 Merge tag 'FixMemLayer_04' into develop
Fix help e note su compilazione packages nuget
2025-09-16 09:19:18 +02:00
Samuele Locatelli 5e5ce2e553 Merge branch 'release/FixMemLayer_04' 2025-09-16 09:19:05 +02:00
Samuele Locatelli e321fee0e4 Update per nuget info compile 2025-09-16 09:18:46 +02:00
Samuele Locatelli 74a1b1a91d Merge tag 'FixMemLayer_03' into develop
Fix gestione timeout cache appConf
2025-09-16 08:55:39 +02:00
Samuele Locatelli 0edb8cc107 Merge branch 'release/FixMemLayer_03' 2025-09-16 08:49:54 +02:00
Samuele Locatelli 5c6d7b45cb Cambio logica cache appCOnf pre redis: 1 sec oltre TTL 2025-09-16 08:49:30 +02:00
Samuele Locatelli 58cfe32458 Merge tag 'FixMemLayer_02' into develop
Ulteriore avanzamento memLayer (da testare)
2025-09-15 10:45:57 +02:00
Samuele Locatelli 08e1fab37b Merge branch 'release/FixMemLayer_02' 2025-09-15 10:45:46 +02:00
Samuele Locatelli b42c8920b1 Ancora update memLayer x evitare problemi data-flood 2025-09-15 10:45:07 +02:00
Samuele Locatelli 590ded3334 Merge tag 'FixMemLayer_01' into develop
Fix init dataLayer pubblico x evitare chiamate appConfig a flood su
Redis
2025-09-15 08:48:25 +02:00
Samuele Locatelli 44d10a83e5 Merge branch 'release/FixMemLayer_01' 2025-09-15 08:40:45 +02:00
Samuele Locatelli 777cde41c1 Modifiche per gestione redis di appConf meno caotica: da provare 2025-09-15 08:39:36 +02:00
Samuele Locatelli 6a845b7287 Refresh Readme x versioni 2024-09-20 15:23:18 +02:00
24 changed files with 1207 additions and 558 deletions
+67 -11
View File
@@ -3,13 +3,15 @@ variables:
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
SOL_NAME: 'SteamWare'
APP_NAME: 'SteamWare'
NUM_PACK: '0.0.0.0'
NUM_REL: '0.1.2.3'
NUM_DEB: '0.1.2-beta.3'
CONFIG: ''
VERS_MAIN: '5.3'
VERS_MAIN: '5.4'
NEW_COPYRIGHT: 'Egalware @'
NET_SHARE_X: '\\codedoc.egalware.com\library'
NET_USER_X: 'gitlab'
NU_TYPE: 'Release'
.DocReplica: &DocReplica
- |
@@ -45,8 +47,37 @@ variables:
$newContenuto | Set-Content -Path $fileNameAss
# display versioni generate
$resoconto = "Effettuato fix file nuspec | release v: " + $env:NUM_REL + " | debug v: " + $env:NUM_DEB;
# sistemo anche versioni in file nuspec
Write-Output $resoconto;
# helper x fix nuspec file: se debug aggiunge -beta nel blocco 3 del SemVer
.nuspec-fix: &nuspec-fix
- |
echo "Modifica dati versione pacchetto nuspec"
$fileNameRel = "$env:APP_NAME/$env:APP_NAME.nuspec";
$fileContent = Get-Content $fileNameRel -Raw;
$pattern = '(?i)<version>\s*(.*?)\s*</version>'
$vers = if ($fileContent -match $pattern) { $matches[1] } else { $null }
echo "Versione corrente: $vers | NugetType: $env:NU_TYPE"
if ($env:NU_TYPE -eq "Debug")
{
# $env:NUM_PACK = $vers -replace '^(\d+)\.(\d+)\.(\d+)\.(\d+)$', '$1.$2.$3-beta.$4'
$env:NUM_PACK = $env:NUM_DEB
}
elseif($env:NU_TYPE -eq "Release")
{
$env:NUM_PACK = $env:NUM_REL
}
echo "Versione calcolata: $env:NUM_PACK"
$findVers = "<version>(.|\n)*?</version>";
$replVers = "<version>" + $env:NUM_PACK + "</version>";
$newContent = $fileContent -replace $findVers, $replVers;
Set-Content -Path $fileNameRel -Value $newContent;
echo "Modifica dati file progetto x nuspec completata su file $fileNameRel"
echo "-----------------------------"
echo "$newContent"
echo "-----------------------------"
stages:
- build
- staging
@@ -139,6 +170,7 @@ SteamWare.IO:staging:
variables:
CONFIG: Debug
APP_NAME: SteamWare.IO
NU_TYPE: Debug
except:
refs:
- main
@@ -149,7 +181,9 @@ SteamWare.IO:staging:
- *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'
- *nuspec-fix
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_DEB -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -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'
@@ -161,6 +195,7 @@ SteamWare.Logger:staging:
variables:
CONFIG: Debug
APP_NAME: SteamWare.Logger
NU_TYPE: Debug
except:
refs:
- main
@@ -171,7 +206,9 @@ SteamWare.Logger:staging:
- *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'
- *nuspec-fix
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_DEB -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -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'
@@ -183,6 +220,7 @@ SteamWare:staging:
variables:
CONFIG: Debug
APP_NAME: SteamWare
NU_TYPE: Debug
except:
refs:
- main
@@ -193,7 +231,9 @@ SteamWare:staging:
- *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'
- *nuspec-fix
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_DEB -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -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'
@@ -205,6 +245,7 @@ SteamWare.Reports:staging:
variables:
CONFIG: Debug
APP_NAME: SteamWare.Reports
NU_TYPE: Debug
except:
refs:
- main
@@ -215,7 +256,9 @@ SteamWare.Reports:staging:
- *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'
- *nuspec-fix
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_DEB -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -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'
@@ -227,6 +270,7 @@ SteamWare.Scheduler:staging:
variables:
CONFIG: Debug
APP_NAME: SteamWare.Scheduler
NU_TYPE: Debug
except:
refs:
- main
@@ -237,7 +281,9 @@ SteamWare.Scheduler:staging:
- *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'
- *nuspec-fix
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_DEB -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -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'
@@ -262,7 +308,9 @@ SteamWare.IO:release:
- *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'
- *nuspec-fix
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_REL -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -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'
@@ -284,7 +332,9 @@ SteamWare.Logger:release:
- *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'
- *nuspec-fix
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_REL -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -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'
@@ -306,7 +356,9 @@ SteamWare:release:
- *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'
- *nuspec-fix
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_REL -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -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'
@@ -328,7 +380,9 @@ SteamWare.Reports:release:
- *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'
- *nuspec-fix
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_REL -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -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'
@@ -350,7 +404,9 @@ SteamWare.Scheduler:release:
- *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'
- *nuspec-fix
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_REL -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -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'
+8 -5
View File
@@ -1,12 +1,15 @@
# SteamWare
Libreria di utility condivise per progetti SteamWare C# .net
Libreria di utility condivise per progetti SteamWare C# .Net Framework.
## Note Rilascio
### v.3.1 (2018.03.17)
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)
Versione | Data | Note
---------|----------|---------
5.4 | 2025.09.15 | Fix metodi x evitare Redis flood in init appConf
5.3 | 2023.09.13 | Last Net Framework version
3.3 | 2019.10.10 | Versione riorganizzata con pubblicazione in formato nuget su repo privato SteamWare (http://nexus.steamware.net)
3.1 | 2018.03.17 | Versione riorganizzata del progetto GIT x correzione problemi di packaging
BIN
View File
Binary file not shown.
+352 -312
View File
File diff suppressed because it is too large Load Diff
+32 -20
View File
@@ -245,6 +245,18 @@ SELECT chiave, valore, valoreStd, note FROM Config WHERE (chiave = @chiave)</Com
</DbCommand>
</SelectCommand>
</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>
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ConfigTmpTableAdapter" GeneratorDataComponentClassName="ConfigTmpTableAdapter" Name="ConfigTmp" UserDataComponentName="ConfigTmpTableAdapter">
@@ -348,55 +360,55 @@ SELECT sorgente, chiave, valore, note FROM ConfigTmp WHERE (chiave = @chiave) AN
</DataSource>
</xs:appinfo>
</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:Generator_UserDSName="DS_Utility" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DS_Utility">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ListValues" msprop:Generator_TableClassName="ListValuesDataTable" msprop:Generator_TableVarName="tableListValues" msprop:Generator_TablePropName="ListValues" msprop:Generator_RowDeletingName="ListValuesRowDeleting" msprop:Generator_RowChangingName="ListValuesRowChanging" msprop:Generator_RowEvHandlerName="ListValuesRowChangeEventHandler" msprop:Generator_RowDeletedName="ListValuesRowDeleted" msprop:Generator_UserTableName="ListValues" msprop:Generator_RowChangedName="ListValuesRowChanged" msprop:Generator_RowEvArgName="ListValuesRowChangeEvent" msprop:Generator_RowClassName="ListValuesRow">
<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_UserTableName="ListValues" msprop:Generator_RowChangingName="ListValuesRowChanging" msprop:Generator_RowClassName="ListValuesRow" msprop:Generator_TableClassName="ListValuesDataTable" msprop:Generator_TableVarName="tableListValues">
<xs:complexType>
<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_UserColumnName="TableName" msprop:Generator_ColumnPropNameInTable="TableNameColumn" msprop:Generator_ColumnPropNameInRow="TableName" msprop:Generator_ColumnVarNameInTable="columnTableName">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</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_UserColumnName="FieldName" msprop:Generator_ColumnPropNameInTable="FieldNameColumn" msprop:Generator_ColumnPropNameInRow="FieldName" msprop:Generator_ColumnVarNameInTable="columnFieldName">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</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_UserColumnName="value" msprop:Generator_ColumnPropNameInTable="valueColumn" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnVarNameInTable="columnvalue">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>
</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_UserColumnName="label" msprop:Generator_ColumnPropNameInTable="labelColumn" msprop:Generator_ColumnPropNameInRow="label" msprop:Generator_ColumnVarNameInTable="columnlabel" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</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_UserColumnName="ordinal" msprop:Generator_ColumnPropNameInTable="ordinalColumn" msprop:Generator_ColumnPropNameInRow="ordinal" msprop:Generator_ColumnVarNameInTable="columnordinal" type="xs:int" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="v_selListVal" msprop:Generator_TableClassName="v_selListValDataTable" msprop:Generator_TableVarName="tablev_selListVal" 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_UserTableName="v_selListVal" msprop:Generator_RowChangedName="v_selListValRowChanged" msprop:Generator_RowEvArgName="v_selListValRowChangeEvent" msprop:Generator_RowClassName="v_selListValRow">
<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_UserTableName="v_selListVal" msprop:Generator_RowChangingName="v_selListValRowChanging" msprop:Generator_RowClassName="v_selListValRow" msprop:Generator_TableClassName="v_selListValDataTable" msprop:Generator_TableVarName="tablev_selListVal">
<xs:complexType>
<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_UserColumnName="value" msprop:Generator_ColumnPropNameInTable="valueColumn" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnVarNameInTable="columnvalue" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="112" />
</xs:restriction>
</xs:simpleType>
</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_UserColumnName="label" msprop:Generator_ColumnPropNameInTable="labelColumn" msprop:Generator_ColumnPropNameInRow="label" msprop:Generator_ColumnVarNameInTable="columnlabel" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
@@ -406,31 +418,31 @@ SELECT sorgente, chiave, valore, note FROM ConfigTmp WHERE (chiave = @chiave) AN
</xs:sequence>
</xs:complexType>
</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_RowEvHandlerName="ConfigRowChangeEventHandler" msprop:Generator_RowDeletedName="ConfigRowDeleted" msprop:Generator_RowDeletingName="ConfigRowDeleting" msprop:Generator_RowEvArgName="ConfigRowChangeEvent" msprop:Generator_TablePropName="Config" msprop:Generator_RowChangedName="ConfigRowChanged" msprop:Generator_UserTableName="Config" msprop:Generator_RowChangingName="ConfigRowChanging" msprop:Generator_RowClassName="ConfigRow" msprop:Generator_TableClassName="ConfigDataTable" msprop:Generator_TableVarName="tableConfig">
<xs:complexType>
<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_UserColumnName="chiave" msprop:Generator_ColumnPropNameInTable="chiaveColumn" msprop:Generator_ColumnPropNameInRow="chiave" msprop:Generator_ColumnVarNameInTable="columnchiave">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</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_UserColumnName="valore" msprop:Generator_ColumnPropNameInTable="valoreColumn" msprop:Generator_ColumnPropNameInRow="valore" msprop:Generator_ColumnVarNameInTable="columnvalore" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</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_UserColumnName="valoreStd" msprop:Generator_ColumnPropNameInTable="valoreStdColumn" msprop:Generator_ColumnPropNameInRow="valoreStd" msprop:Generator_ColumnVarNameInTable="columnvaloreStd" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</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_UserColumnName="note" msprop:Generator_ColumnPropNameInTable="noteColumn" msprop:Generator_ColumnPropNameInRow="note" msprop:Generator_ColumnVarNameInTable="columnnote" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2147483647" />
@@ -440,31 +452,31 @@ SELECT sorgente, chiave, valore, note FROM ConfigTmp WHERE (chiave = @chiave) AN
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ConfigTmp" msprop:Generator_TableClassName="ConfigTmpDataTable" msprop:Generator_TableVarName="tableConfigTmp" msprop:Generator_TablePropName="ConfigTmp" msprop:Generator_RowDeletingName="ConfigTmpRowDeleting" msprop:Generator_RowChangingName="ConfigTmpRowChanging" msprop:Generator_RowEvHandlerName="ConfigTmpRowChangeEventHandler" msprop:Generator_RowDeletedName="ConfigTmpRowDeleted" msprop:Generator_UserTableName="ConfigTmp" msprop:Generator_RowChangedName="ConfigTmpRowChanged" msprop:Generator_RowEvArgName="ConfigTmpRowChangeEvent" msprop:Generator_RowClassName="ConfigTmpRow">
<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_UserTableName="ConfigTmp" msprop:Generator_RowChangingName="ConfigTmpRowChanging" msprop:Generator_RowClassName="ConfigTmpRow" msprop:Generator_TableClassName="ConfigTmpDataTable" msprop:Generator_TableVarName="tableConfigTmp">
<xs:complexType>
<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_UserColumnName="sorgente" msprop:Generator_ColumnPropNameInTable="sorgenteColumn" msprop:Generator_ColumnPropNameInRow="sorgente" msprop:Generator_ColumnVarNameInTable="columnsorgente">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</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_UserColumnName="chiave" msprop:Generator_ColumnPropNameInTable="chiaveColumn" msprop:Generator_ColumnPropNameInRow="chiave" msprop:Generator_ColumnVarNameInTable="columnchiave">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</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_UserColumnName="valore" msprop:Generator_ColumnPropNameInTable="valoreColumn" msprop:Generator_ColumnPropNameInRow="valore" msprop:Generator_ColumnVarNameInTable="columnvalore">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250" />
</xs:restriction>
</xs:simpleType>
</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_UserColumnName="note" msprop:Generator_ColumnPropNameInTable="noteColumn" msprop:Generator_ColumnPropNameInRow="note" msprop:Generator_ColumnVarNameInTable="columnnote">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250" />
+2 -2
View File
@@ -4,11 +4,11 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</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="-10" 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="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:ListValues" ZOrder="4" X="0" Y="0" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:v_selListVal" ZOrder="2" X="634" Y="4" Height="153" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:Config" ZOrder="1" X="957" Y="6" Height="172" Width="183" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:Config" ZOrder="1" X="957" Y="6" Height="191" Width="219" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:ConfigTmp" ZOrder="3" X="324" Y="4" Height="210" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
</Shapes>
<Connectors />
+9 -9
View File
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@@ -12,7 +12,7 @@ namespace SteamWare.IO.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -26,8 +26,8 @@ namespace SteamWare.IO.Properties {
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQLSTEAM;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=" +
"True;User ID=sa;Password=keyhammer")]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQLSTEAM;TrustServerCertificate=True;Initial Catalog=SteamWare_Vocabo" +
"lario;Persist Security Info=True;User ID=sa;Password=keyhammer;")]
public string SteamWare_VocabolarioConnectionString {
get {
return ((string)(this["SteamWare_VocabolarioConnectionString"]));
@@ -37,8 +37,8 @@ namespace SteamWare.IO.Properties {
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID" +
"=sa;Password=keyhammer16")]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQL2016DEV;TrustServerCertificate=True;Initial Catalog=MoonPro;Persis" +
"t Security Info=True;User ID=sa;")]
public string DbConfConnectionString {
get {
return ((string)(this["DbConfConnectionString"]));
+6 -6
View File
@@ -4,19 +4,19 @@
<Settings>
<Setting Name="SteamWare_VocabolarioConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=SQLSTEAM;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer&lt;/ConnectionString&gt;
&lt;SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
&lt;ConnectionString&gt;Data Source=SQLSTEAM;TrustServerCertificate=True;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer;&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=SQLSTEAM;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer</Value>
<Value Profile="(Default)">Data Source=SQLSTEAM;TrustServerCertificate=True;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer;</Value>
</Setting>
<Setting Name="DbConfConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer16&lt;/ConnectionString&gt;
&lt;SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
&lt;ConnectionString&gt;Data Source=SQL2016DEV;TrustServerCertificate=True;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer16</Value>
<Value Profile="(Default)">Data Source=SQL2016DEV;TrustServerCertificate=True;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;</Value>
</Setting>
</Settings>
</SettingsFile>
+2
View File
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SteamWare.IO</RootNamespace>
<AssemblyName>SteamWare.IO</AssemblyName>
<Authors>Samuele E. Locatelli</Authors>
<Description>Steamware IO helper lib for framework projects</Description>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>SteamWare.IO</id>
<version>0.0.0.0</version>
<authors>Samuele E. Locatelli</authors>
<description>Steamware IO helper lib for framework projects</description>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
</metadata>
</package>
+6 -2
View File
@@ -3,8 +3,12 @@
<configSections>
</configSections>
<connectionStrings>
<add name="SteamWare.IO.Properties.Settings.SteamWare_VocabolarioConnectionString" connectionString="Data Source=SQLSTEAM;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient" />
<add name="SteamWare.IO.Properties.Settings.DbConfConnectionString" connectionString="Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer16" providerName="System.Data.SqlClient" />
<add name="SteamWare.IO.Properties.Settings.SteamWare_VocabolarioConnectionString"
connectionString="Data Source=SQLSTEAM;TrustServerCertificate=True;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer;"
providerName="System.Data.SqlClient" />
<add name="SteamWare.IO.Properties.Settings.DbConfConnectionString"
connectionString="Data Source=SQL2016DEV;TrustServerCertificate=True;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+200 -94
View File
@@ -31,6 +31,11 @@ namespace SteamWare.IO
/// </summary>
public Dictionary<string, string> AppConf;
/// <summary>
/// Definisce il TTL x appConf (secondi)
/// </summary>
public int maxAgeAppConf = 5;
/// <summary>
/// Table adapter accesso conf parameters
/// </summary>
@@ -43,6 +48,28 @@ namespace SteamWare.IO
#endregion Public Fields
#region Public Constructors
/// <summary>
/// classe gestione accessi a Session, cache, viewstate, configuration...
/// </summary>
public memLayer()
{
if (Log == null)
{
Log = LogManager.GetCurrentClassLogger();
}
// istanzia il conf setting reader...
configAppSetReader = new AppSettingsReader();
// avvio e configuro TA
initTA();
setupConnectionStringBase();
setupMongo();
setupParams();
}
#endregion Public Constructors
#region Public Enums
/// <summary>
@@ -175,27 +202,6 @@ namespace SteamWare.IO
}
}
/// <summary>
/// Recupera il TTL x appConf (secondi)
/// </summary>
public int maxAgeAppConf
{
get
{
// default 5 minuti x refresh...
int maxAge = 5;
try
{
maxAge = confReadInt("maxAgeAppConf_min");
}
catch (Exception exc)
{
Log.Error(string.Format("Errore in lettura valore maxAgeAppConf_min{0}{1}", Environment.NewLine, exc));
}
return maxAge * 60;
}
}
/// <summary>
/// Numero record salvati in AppConf
/// </summary>
@@ -509,12 +515,14 @@ namespace SteamWare.IO
public string configDbVal(string chiave)
{
string answ = "";
bool cacheReloaded = false;
if (confReadString("DbConfConnectionString") != "")
{
// verifico esista oggetto...
if (AppConf == null)
{
resetAppConf();
cacheReloaded = true;
}
if (AppConf != null)
{
@@ -522,11 +530,12 @@ namespace SteamWare.IO
if (AppConf.Count == 0)
{
resetAppConf();
cacheReloaded = true;
}
// controllo SE in redis ci sia ancora il valore, altrimenti rileggo...
if (!redKeyPresent(ACBH))
if (!cacheReloaded && DateTime.Now > vetoCacheCheck && !redKeyPresent(ACBH))
{
Log.Info(string.Format("Manca HASH in redis --> rileggo da DB --> REDIS --> Memoria | {0} | {1}", ACBH, chiave));
Log.Info($"Manca HASH in redis --> rileggo da DB --> REDIS --> Memoria | {ACBH} | {chiave}");
resetAppConf();
}
// provo a leggere da DICT
@@ -538,7 +547,7 @@ namespace SteamWare.IO
}
catch (Exception exc)
{
Log.Error(string.Format("Errore in lettura AppConf[{0}] durante configDbVal{1}{2}", chiave, Environment.NewLine, exc));
Log.Error($"Errore in lettura AppConf[{chiave}] durante configDbVal{Environment.NewLine}{exc}");
}
}
}
@@ -885,7 +894,7 @@ namespace SteamWare.IO
}
catch (Exception exc)
{
Log.Error(string.Format("Eccezione in getRSV:{0}{1}", Environment.NewLine, exc));
Log.Error($"Errore in getRSV:{Environment.NewLine}{exc}");
}
return answInt;
}
@@ -926,7 +935,7 @@ namespace SteamWare.IO
}
catch (Exception exc)
{
Log.Error(string.Format("Eccezione in getRKeys:{0}{1}", Environment.NewLine, exc));
Log.Error($"Errore in getRKeys:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -964,8 +973,10 @@ namespace SteamWare.IO
{
answ = HttpContext.Current.Request.Cookies[nome].Value != "";
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in hasCookieVal:{Environment.NewLine}{exc}");
}
}
return answ;
}
@@ -1000,6 +1011,20 @@ namespace SteamWare.IO
{
try
{
// cerco come key...
var redVal = getRSV(redHash(nomeVar));
answ = !string.IsNullOrEmpty(redVal);
if (!answ)
{
answ = redKeyPresent(redHash(nomeVar));
// cerco come variabile se NON trovata...
if (!answ)
{
// cerco come hash...
answ = redHashPresent(redHash(nomeVar));
}
}
#if false
// cerco come key...
answ = redKeyPresent(redHash(nomeVar));
if (!answ)
@@ -1011,12 +1036,13 @@ namespace SteamWare.IO
if (!answ)
{
var redVal = getRSV(redHash(nomeVar));
answ = redVal != null && redVal != "";
answ = !string.IsNullOrEmpty(redVal);
}
#endif
}
catch (Exception exc)
{
Log.Error(string.Format("Eccezzione in verifica isInCacheObject REDIS per chiave{0}{1}{2}", nomeVar, Environment.NewLine, exc));
Log.Error($"Errore in verifica isInCacheObject REDIS per chiave{nomeVar}{Environment.NewLine}{exc}");
}
}
else
@@ -1026,8 +1052,10 @@ namespace SteamWare.IO
{
stringAnsw = HttpContext.Current.Cache[nomeVar].ToString() != "";
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in verifica HttpContext.Current.Cache per chiave{nomeVar}{Environment.NewLine}{exc}");
}
// infine condizione doppia...
try
{
@@ -1035,7 +1063,7 @@ namespace SteamWare.IO
}
catch (Exception exc)
{
Log.Error(string.Format("Eccezzione in verifica isInCacheObject per chiave{0}{1}{2}", nomeVar, Environment.NewLine, exc));
Log.Error($"Errore in verifica NULL per HttpContext.Current.Cache per chiave{nomeVar}{Environment.NewLine}{exc}");
}
}
return answ;
@@ -1056,15 +1084,19 @@ namespace SteamWare.IO
//stringAnsw = (string)HttpContext.Current.Session[nomeVar].ToString() != "";
stringAnsw = HttpContext.Current.Session[nomeVar] != null;
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore 01 | isInSessionObject:{Environment.NewLine}{exc}");
}
// infine condizione doppia...
try
{
answ = (HttpContext.Current.Session[nomeVar] != null && stringAnsw);
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore 02 | isInSessionObject:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1141,8 +1173,10 @@ namespace SteamWare.IO
{
answ = Convert.ToBoolean(HttpContext.Current.Request.QueryString[nome]);
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in QSB:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1158,8 +1192,10 @@ namespace SteamWare.IO
{
answ = Convert.ToDateTime(HttpContext.Current.Request.QueryString[nome]);
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in QSD:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1175,8 +1211,10 @@ namespace SteamWare.IO
{
answ = Convert.ToInt32(HttpContext.Current.Request.QueryString[nome]);
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in QSI:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1194,8 +1232,10 @@ namespace SteamWare.IO
{
answ = HttpContext.Current.Request.QueryString[nome].ToString().Trim();
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in QSS:{Environment.NewLine}{exc}");
}
}
return answ;
}
@@ -1215,7 +1255,7 @@ namespace SteamWare.IO
foreach (var ep in connRedis.GetEndPoints())
{
var server = connRedis.GetServer(ep);
foreach (var key in server.Keys(pattern: keyPattern))
foreach (var key in server.Keys(pattern: keyPattern, database: _currDB.Database))
{
answ++;
}
@@ -1266,8 +1306,10 @@ namespace SteamWare.IO
cache.KeyDelete(chiave);
answ = true;
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in redDelKey:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1345,8 +1387,10 @@ namespace SteamWare.IO
answ.Add(new KeyValuePair<string, int>(chiavi[i], currVal));
}
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in redGetCounterByKey 02{Environment.NewLine}{exc}");
}
// se richiesto riordino...
switch (orderBy)
{
@@ -1393,8 +1437,10 @@ namespace SteamWare.IO
i++;
}
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in redGetHash{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1416,8 +1462,10 @@ namespace SteamWare.IO
answ.Add(item.Name, item.Value);
}
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in redGetHashDict{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1438,8 +1486,38 @@ namespace SteamWare.IO
RedisValue valOut = cache.HashGet(chiave, campo);
answ = valOut.ToString();
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in redGetHashField{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
/// Elenco oggetti cache redis che rispondono a pattern
/// </summary>
/// <param name="keyPattern">** = tutti</param>
/// <returns></returns>
public List<RedisKey> redGetKeys(string keyPattern)
{
List<RedisKey> answ = new List<RedisKey>();
// cerco se ci sia valore in redis... se vuoto = ALL...
keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern;
try
{
foreach (var ep in connRedis.GetEndPoints())
{
var server = connRedis.GetServer(ep);
foreach (var key in server.Keys(pattern: keyPattern, database: _currDB.Database))
{
answ.Add(key);
}
}
}
catch (Exception exc)
{
Log.Error($"Errore in redGetKeys{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1454,8 +1532,10 @@ namespace SteamWare.IO
{
answ = string.Format("{0}:{1}:{2}:{3}", confReadString("CodModulo"), taConfig.Connection.DataSource, taConfig.Connection.Database, keyName).Replace("\\", "_");
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in redHash{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1474,7 +1554,7 @@ namespace SteamWare.IO
}
catch (Exception exc)
{
Log.Error(string.Format("Eccezione in redHashPresent per la key {2}{0}{1}", Environment.NewLine, exc, key));
Log.Error($"Errore in redHashPresent | {key}{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1492,8 +1572,10 @@ namespace SteamWare.IO
RedisKey chiave = key;
answ = redHashPresent(chiave);
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in redHashPresentSz | {key}{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1512,7 +1594,7 @@ namespace SteamWare.IO
}
catch (Exception exc)
{
Log.Error(string.Format("Eccezione in redKeyPresent per la key {2}:{0}{1}", Environment.NewLine, exc, key));
Log.Error($"Errore in redKeyPresent | RedisKey: {key}{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1530,8 +1612,10 @@ namespace SteamWare.IO
RedisKey chiave = key;
answ = redKeyPresent(chiave);
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in redKeyPresentSz | {key}{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1558,8 +1642,10 @@ namespace SteamWare.IO
cache.HashSet(chiave, valori);
answ = true;
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in redSaveHash{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1586,8 +1672,10 @@ namespace SteamWare.IO
}
//answ = true;
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in redSaveHash | {hashKey}{Environment.NewLine}{exc}");
}
return answ;
}
@@ -1614,8 +1702,10 @@ namespace SteamWare.IO
cache.HashSet(chiave, valori);
answ = true;
}
catch
{ }
catch (Exception exc)
{
Log.Error($"Errore in redSaveHashDict | {hashKey}{Environment.NewLine}{exc}");
}
return answ;
}
@@ -2120,6 +2210,19 @@ namespace SteamWare.IO
return answ;
}
/// <summary>
/// Aggiornamento di una chiave in tabella config
/// </summary>
/// <param name="chiave"></param>
/// <param name="valore"></param>
public void updateAppConf(string chiave, string valore)
{
// recupero valore attuale...
memLayer nML = new memLayer();
nML.taConfig.updateQuery(chiave, valore);
resetAppConf();
}
#endregion Public Methods
#region Protected Fields
@@ -2136,27 +2239,6 @@ namespace SteamWare.IO
#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>
@@ -2248,11 +2330,11 @@ namespace SteamWare.IO
}
catch (Exception exc)
{
Log.Error(string.Format("Errore procedura ricaricaAppConf per kvp: {0} / {1}{2}{3}", riga.chiave, riga.valore, Environment.NewLine, exc));
Log.Error($"Errore procedura ricaricaAppConf per kvp: {riga.chiave} / {riga.valore}{Environment.NewLine}{exc}");
}
}
// log ricarica
Log.Info(string.Format("Effettuata procedura ricaricaAppConf per {0} records", answ.Count));
Log.Info($"Effettuata procedura ricaricaAppConf per {answ.Count} records");
}
return answ;
}
@@ -2306,6 +2388,8 @@ namespace SteamWare.IO
}
// salvo in redis valori (con TTL)
redSaveHash(ACBH, valori, maxAgeAppConf);
// salvo info cache riletta 2 sec prima della scadenza
vetoCacheCheck = DateTime.Now.AddSeconds(maxAgeAppConf + 1);
Log.Info("Completato procedura startupAppConf");
}
else
@@ -2316,7 +2400,7 @@ namespace SteamWare.IO
}
catch (Exception exc)
{
Log.Error(string.Format("Errore in startupAppConf:{0}{1}", Environment.NewLine, exc));
Log.Error($"Errore in startupAppConf:{Environment.NewLine}{exc}");
}
}
}
@@ -2355,6 +2439,8 @@ namespace SteamWare.IO
return ConnectionMultiplexer.Connect(RedisConnAdmin);
});
private DateTime vetoCacheCheck = DateTime.Now;
#endregion Private Fields
#region Private Properties
@@ -2398,6 +2484,26 @@ namespace SteamWare.IO
currMongoClient = new MongoClient(mongoConnString);
}
private void setupParams()
{
// default 5 minuti x refresh...
int maxAge = 5;
try
{
maxAge = confReadInt("maxAgeAppConf_min");
}
catch (Exception exc)
{
Log.Error($"Errore in lettura valore maxAgeAppConf_min{Environment.NewLine}{exc}");
}
// controllo maxage valida...
if (maxAge < 1)
{
maxAge = 5;
}
maxAgeAppConf = maxAge * 60;
}
#endregion Private Methods
}
}
+2
View File
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SteamWare.Logger</RootNamespace>
<AssemblyName>SteamWare.Logger</AssemblyName>
<Authors>Samuele E. Locatelli</Authors>
<Description>Steamware Logger helper lib for framework projects</Description>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>SteamWare.Logger</id>
<version>0.0.0.0</version>
<authors>Samuele E. Locatelli</authors>
<description>Steamware Logger helper lib for framework projects</description>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
</metadata>
</package>
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SteamWare.Reports</RootNamespace>
<AssemblyName>SteamWare.Reports</AssemblyName>
<Authors>Samuele E. Locatelli</Authors>
<Description>Steamware Reports helper lib for framework projects</Description>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>SteamWare.Reports</id>
<version>0.0.0.0</version>
<authors>Samuele E. Locatelli</authors>
<description>Steamware Reports helper lib for framework projects</description>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
</metadata>
</package>
+2
View File
@@ -10,6 +10,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SteamWare</RootNamespace>
<AssemblyName>SteamWare</AssemblyName>
<Authors>Samuele E. Locatelli</Authors>
<Description>Steamware global helper lib for framework projects</Description>
<SignAssembly>false</SignAssembly>
<FileUpgradeFlags>
</FileUpgradeFlags>
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>SteamWare</id>
<version>0.0.0.0</version>
<authors>Samuele E. Locatelli</authors>
<owners>Samuele E. Locatelli</owners>
<description>Steamware global helper lib for framework projects</description>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<tags>steamware helper</tags>
</metadata>
</package>
+105 -56
View File
@@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Text;
using System.Threading;
using System.Web;
namespace SteamWare
@@ -28,6 +29,11 @@ namespace SteamWare
/// </summary>
public Dictionary<string, string> AppConf;
/// <summary>
/// Definisce il TTL x appConf (secondi)
/// </summary>
public int maxAgeAppConf = 5;
/// <summary>
/// Table adapter accesso conf parameters
/// </summary>
@@ -40,6 +46,24 @@ namespace SteamWare
#endregion Public Fields
#region Public Constructors
/// <summary>
/// classe gestione accessi a Session, cache, viewstate, configuration...
/// </summary>
public memLayer()
{
// istanzia il conf setting reader...
configAppSetReader = new AppSettingsReader();
// avvio e configuro TA
initTA();
setupConnectionStringBase();
setupMongo();
setupParams();
}
#endregion Public Constructors
#region Public Enums
/// <summary>
@@ -172,27 +196,6 @@ namespace SteamWare
}
}
/// <summary>
/// Recupera il TTL x appConf (secondi)
/// </summary>
public int maxAgeAppConf
{
get
{
// default 5 minuti x refresh...
int maxAge = 5;
try
{
maxAge = confReadInt("maxAgeAppConf_min");
}
catch (Exception exc)
{
Log.Error(string.Format("Errore in lettura valore maxAgeAppConf_min{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
}
return maxAge * 60;
}
}
/// <summary>
/// Numero record salvati in AppConf
/// </summary>
@@ -506,12 +509,14 @@ namespace SteamWare
public string configDbVal(string chiave)
{
string answ = "";
bool cacheReloaded = false;
if (confReadString("DbConfConnectionString") != "")
{
// verifico esista oggetto...
if (AppConf == null)
{
resetAppConf();
cacheReloaded = true;
}
if (AppConf != null)
{
@@ -519,9 +524,10 @@ namespace SteamWare
if (AppConf.Count == 0)
{
resetAppConf();
cacheReloaded = true;
}
// controllo SE in redis ci sia ancora il valore, altrimenti rileggo...
if (!redKeyPresent(ACBH))
if (!cacheReloaded && DateTime.Now > vetoCacheCheck && !redKeyPresent(ACBH))
{
Log.Info($"Manca HASH in redis --> rileggo da DB --> REDIS --> Memoria | {ACBH} | {chiave}");
resetAppConf();
@@ -1065,14 +1071,25 @@ namespace SteamWare
public bool isInSessionObject(string nomeVar)
{
bool answ = false;
bool stringAnsw = false;
// cerco se ci sia...
try
{
answ = (HttpContext.Current.Session[nomeVar] != null);
//stringAnsw = (string)HttpContext.Current.Session[nomeVar].ToString() != "";
stringAnsw = HttpContext.Current.Session[nomeVar] != null;
}
catch (Exception exc)
{
Log.Error($"Errore in isInSessionObject:{Environment.NewLine}{exc}");
Log.Error($"Errore 01 | isInSessionObject:{Environment.NewLine}{exc}");
}
// infine condizione doppia...
try
{
answ = (HttpContext.Current.Session[nomeVar] != null && stringAnsw);
}
catch (Exception exc)
{
Log.Error($"Errore 02 | isInSessionObject:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -2216,23 +2233,6 @@ namespace SteamWare
#endregion Protected 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 Protected Properties
/// <summary>
@@ -2297,21 +2297,39 @@ namespace SteamWare
Dictionary<string, string> answ = new Dictionary<string, string>();
// istanzio un NUOVO oggetto x evitare problemi init contestuali
memLayer nML = new memLayer();
var tabDati = nML.taConfig.GetData();
// carico
foreach (DS_Utility.ConfigRow riga in tabDati)
DS_Utility.ConfigDataTable tabDati = null;
int waitMs = 100;
int numTry = 5;
do
{
try
{
answ.Add(riga.chiave, riga.valore);
tabDati = nML.taConfig.GetData();
}
catch (Exception exc)
{
Log.Error($"Errore procedura ricaricaAppConf per kvp: {riga.chiave} / {riga.valore}{Environment.NewLine}{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($"Errore procedura ricaricaAppConf per kvp: {riga.chiave} / {riga.valore}{Environment.NewLine}{exc}");
}
}
// log ricarica
Log.Info($"Effettuata procedura ricaricaAppConf per {answ.Count} records");
}
// log ricarica
Log.Info($"Effettuata procedura ricaricaAppConf per {answ.Count} records");
return answ;
}
@@ -2353,16 +2371,25 @@ namespace SteamWare
else
{
AppConf = ricaricaAppConf();
KeyValuePair<string, string>[] valori = new KeyValuePair<string, string>[AppConf.Count];
int i = 0;
foreach (var item in AppConf)
if (AppConf.Count > 0)
{
valori[i] = new KeyValuePair<string, string>(item.Key, item.Value);
i++;
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);
// salvo info cache riletta 2 sec prima della scadenza
vetoCacheCheck = DateTime.Now.AddSeconds(maxAgeAppConf + 1);
Log.Info("Completato procedura startupAppConf");
}
else
{
Log.Error("Errore in procedura startupAppConf, ritornato insieme vuoto");
}
// salvo in redis valori (con TTL)
redSaveHash(ACBH, valori, maxAgeAppConf);
Log.Info("Completato procedura startupAppConf");
}
}
catch (Exception exc)
@@ -2406,6 +2433,8 @@ namespace SteamWare
return ConnectionMultiplexer.Connect(RedisConnAdmin);
});
private DateTime vetoCacheCheck = DateTime.Now;
#endregion Private Fields
#region Private Properties
@@ -2449,6 +2478,26 @@ namespace SteamWare
currMongoClient = new MongoClient(mongoConnString);
}
private void setupParams()
{
// default 5 minuti x refresh...
int maxAge = 5;
try
{
maxAge = confReadInt("maxAgeAppConf_min");
}
catch (Exception exc)
{
Log.Error($"Errore in lettura valore maxAgeAppConf_min{Environment.NewLine}{exc}");
}
// controllo maxage valida...
if (maxAge < 1)
{
maxAge = 5;
}
maxAgeAppConf = maxAge * 60;
}
#endregion Private Methods
}
}
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>SteamWare.Scheduler</id>
<version>0.0.0.0</version>
<authors>Samuele E. Locatelli</authors>
<description>SteamWare Scheduler helper lib for framework projects</description>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<tags>steamware helper</tags>
</metadata>
</package>
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SteamWare.Scheduler</RootNamespace>
<AssemblyName>SteamWare.Scheduler</AssemblyName>
<Authors>Samuele E. Locatelli</Authors>
<Description>Steamware Scheduler helper lib for framework projects</Description>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
+8 -2
View File
@@ -5,11 +5,17 @@
</startup>
<appSettings>
<!--Redis conn-->
<add key="RedisConn" value="localhost,abortConnect=false,ssl=false" />
<add key="RedisConnAdmin" value="localhost,abortConnect=false,ssl=false" />
<add key="RedisConn" value="redis.ufficio:26379,serviceName=devel,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false" />
<add key="RedisConnAdmin" value="redis.ufficio:26379,serviceName=devel,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,allowAdmin=true" />
<!--<add key="RedisConn" value="localhost,abortConnect=false,ssl=false" />
<add key="RedisConnAdmin" value="localhost,abortConnect=false,ssl=false" />-->
<add key="cacheOnRedis" value="true" />
<add key="redisDb" value="1" />
<add key="_logDir" value="./logs/" />
<!--Email-->
<add key="_PortSSL" value="587"/>
<add key="_enableSSL" value="true"/>
<add key="_useAIMSmtp" value="false" />
<add key="vetoRedisCheckLimit" value="100" />
<add key="vetoRedisPausePurge" value="10" />
<add key="vetoRedisPurgeMax" value="300" />
+298 -39
View File
@@ -97,13 +97,34 @@
this.btnSendMessage = new System.Windows.Forms.Button();
this.txtChannelName = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.tabPage9 = new System.Windows.Forms.TabPage();
this.lblOutTestMatr = new System.Windows.Forms.Label();
this.btnTestUserLoad = new System.Windows.Forms.Button();
this.label13 = new System.Windows.Forms.Label();
this.txtMatr = new System.Windows.Forms.TextBox();
this.clockTimer = new System.Windows.Forms.Timer(this.components);
this.LogTimer = new System.Windows.Forms.Timer(this.components);
this.tabPage9 = new System.Windows.Forms.TabPage();
this.txtMatr = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.btnTestUserLoad = new System.Windows.Forms.Button();
this.lblOutTestMatr = new System.Windows.Forms.Label();
this.tabPage10 = new System.Windows.Forms.TabPage();
this.chkSSL = new System.Windows.Forms.CheckBox();
this.label14 = new System.Windows.Forms.Label();
this.txtEmailTestOut = new System.Windows.Forms.TextBox();
this.btnSendEmail = new System.Windows.Forms.Button();
this.txtSubj = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.txtMessage = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.txtEmailDest = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.txtEmailFrom = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.txtEmailPwd = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label();
this.txtEmailUser = new System.Windows.Forms.TextBox();
this.label21 = new System.Windows.Forms.Label();
this.txtServerPort = new System.Windows.Forms.TextBox();
this.label22 = new System.Windows.Forms.Label();
this.txtSmtpServ = new System.Windows.Forms.TextBox();
this.label23 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
@@ -119,6 +140,7 @@
this.tabPage7.SuspendLayout();
this.tabPage8.SuspendLayout();
this.tabPage9.SuspendLayout();
this.tabPage10.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
@@ -285,6 +307,7 @@
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage10);
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
@@ -299,7 +322,7 @@
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(776, 392);
this.tabControl1.TabIndex = 10;
this.tabControl1.TabIndex = 1;
//
// tabPage1
//
@@ -860,16 +883,6 @@
this.label12.TabIndex = 0;
this.label12.Text = "Channel Name";
//
// clockTimer
//
this.clockTimer.Interval = 50;
this.clockTimer.Tick += new System.EventHandler(this.clockTimer_Tick);
//
// LogTimer
//
this.LogTimer.Interval = 10;
this.LogTimer.Tick += new System.EventHandler(this.LogTimer_Tick);
//
// tabPage9
//
this.tabPage9.Controls.Add(this.lblOutTestMatr);
@@ -884,23 +897,14 @@
this.tabPage9.Text = "Test Vari";
this.tabPage9.UseVisualStyleBackColor = true;
//
// txtMatr
// lblOutTestMatr
//
this.txtMatr.Location = new System.Drawing.Point(41, 11);
this.txtMatr.Name = "txtMatr";
this.txtMatr.Size = new System.Drawing.Size(69, 20);
this.txtMatr.TabIndex = 0;
this.txtMatr.Text = "102";
this.txtMatr.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(8, 14);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(27, 13);
this.label13.TabIndex = 1;
this.label13.Text = "matr";
this.lblOutTestMatr.AutoSize = true;
this.lblOutTestMatr.Location = new System.Drawing.Point(218, 14);
this.lblOutTestMatr.Name = "lblOutTestMatr";
this.lblOutTestMatr.Size = new System.Drawing.Size(16, 13);
this.lblOutTestMatr.TabIndex = 3;
this.lblOutTestMatr.Text = "---";
//
// btnTestUserLoad
//
@@ -912,14 +916,246 @@
this.btnTestUserLoad.UseVisualStyleBackColor = true;
this.btnTestUserLoad.Click += new System.EventHandler(this.btnTestUserLoad_Click);
//
// lblOutTestMatr
// label13
//
this.lblOutTestMatr.AutoSize = true;
this.lblOutTestMatr.Location = new System.Drawing.Point(218, 14);
this.lblOutTestMatr.Name = "lblOutTestMatr";
this.lblOutTestMatr.Size = new System.Drawing.Size(16, 13);
this.lblOutTestMatr.TabIndex = 3;
this.lblOutTestMatr.Text = "---";
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(8, 14);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(27, 13);
this.label13.TabIndex = 1;
this.label13.Text = "matr";
//
// txtMatr
//
this.txtMatr.Location = new System.Drawing.Point(41, 11);
this.txtMatr.Name = "txtMatr";
this.txtMatr.Size = new System.Drawing.Size(69, 20);
this.txtMatr.TabIndex = 0;
this.txtMatr.Text = "102";
this.txtMatr.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// clockTimer
//
this.clockTimer.Interval = 50;
this.clockTimer.Tick += new System.EventHandler(this.clockTimer_Tick);
//
// LogTimer
//
this.LogTimer.Interval = 10;
this.LogTimer.Tick += new System.EventHandler(this.LogTimer_Tick);
//
// tabPage10
//
this.tabPage10.Controls.Add(this.chkSSL);
this.tabPage10.Controls.Add(this.label14);
this.tabPage10.Controls.Add(this.txtEmailTestOut);
this.tabPage10.Controls.Add(this.btnSendEmail);
this.tabPage10.Controls.Add(this.txtSubj);
this.tabPage10.Controls.Add(this.label16);
this.tabPage10.Controls.Add(this.txtMessage);
this.tabPage10.Controls.Add(this.label17);
this.tabPage10.Controls.Add(this.txtEmailDest);
this.tabPage10.Controls.Add(this.label18);
this.tabPage10.Controls.Add(this.txtEmailFrom);
this.tabPage10.Controls.Add(this.label19);
this.tabPage10.Controls.Add(this.txtEmailPwd);
this.tabPage10.Controls.Add(this.label20);
this.tabPage10.Controls.Add(this.txtEmailUser);
this.tabPage10.Controls.Add(this.label21);
this.tabPage10.Controls.Add(this.txtServerPort);
this.tabPage10.Controls.Add(this.label22);
this.tabPage10.Controls.Add(this.txtSmtpServ);
this.tabPage10.Controls.Add(this.label23);
this.tabPage10.Location = new System.Drawing.Point(4, 22);
this.tabPage10.Name = "tabPage10";
this.tabPage10.Padding = new System.Windows.Forms.Padding(3);
this.tabPage10.Size = new System.Drawing.Size(768, 366);
this.tabPage10.TabIndex = 9;
this.tabPage10.Text = "Email test";
this.tabPage10.UseVisualStyleBackColor = true;
this.tabPage10.Enter += new System.EventHandler(this.tabPage10_Enter);
//
// chkSSL
//
this.chkSSL.AutoSize = true;
this.chkSSL.Checked = true;
this.chkSSL.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkSSL.Enabled = false;
this.chkSSL.Location = new System.Drawing.Point(110, 69);
this.chkSSL.Name = "chkSSL";
this.chkSSL.Size = new System.Drawing.Size(68, 17);
this.chkSSL.TabIndex = 41;
this.chkSSL.Text = "Use SSL";
this.chkSSL.UseVisualStyleBackColor = true;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(2, 69);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(42, 13);
this.label14.TabIndex = 40;
this.label14.Text = "Opzioni";
//
// txtEmailTestOut
//
this.txtEmailTestOut.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
this.txtEmailTestOut.ForeColor = System.Drawing.SystemColors.Info;
this.txtEmailTestOut.Location = new System.Drawing.Point(295, 4);
this.txtEmailTestOut.Multiline = true;
this.txtEmailTestOut.Name = "txtEmailTestOut";
this.txtEmailTestOut.Size = new System.Drawing.Size(472, 362);
this.txtEmailTestOut.TabIndex = 39;
this.txtEmailTestOut.Text = "...";
//
// btnSendEmail
//
this.btnSendEmail.Location = new System.Drawing.Point(5, 320);
this.btnSendEmail.Name = "btnSendEmail";
this.btnSendEmail.Size = new System.Drawing.Size(284, 43);
this.btnSendEmail.TabIndex = 37;
this.btnSendEmail.Text = "Send Message";
this.btnSendEmail.UseVisualStyleBackColor = true;
this.btnSendEmail.Click += new System.EventHandler(this.btnSendEmail_Click);
//
// txtSubj
//
this.txtSubj.Location = new System.Drawing.Point(110, 234);
this.txtSubj.Name = "txtSubj";
this.txtSubj.Size = new System.Drawing.Size(179, 20);
this.txtSubj.TabIndex = 36;
this.txtSubj.Text = "Invio messaggio di prova";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(2, 237);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(43, 13);
this.label16.TabIndex = 35;
this.label16.Text = "Subject";
//
// txtMessage
//
this.txtMessage.Location = new System.Drawing.Point(110, 267);
this.txtMessage.Multiline = true;
this.txtMessage.Name = "txtMessage";
this.txtMessage.Size = new System.Drawing.Size(179, 47);
this.txtMessage.TabIndex = 34;
this.txtMessage.Text = "Messaggio di prova - test librerie SteamWareLibs.dll net Framework.";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(2, 270);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(50, 13);
this.label17.TabIndex = 33;
this.label17.Text = "Message";
//
// txtEmailDest
//
this.txtEmailDest.Location = new System.Drawing.Point(110, 201);
this.txtEmailDest.Name = "txtEmailDest";
this.txtEmailDest.Size = new System.Drawing.Size(179, 20);
this.txtEmailDest.TabIndex = 32;
this.txtEmailDest.Text = "samuele.locatelli@egalware.com";
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(2, 204);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(53, 13);
this.label18.TabIndex = 31;
this.label18.Text = "To (email)";
//
// txtEmailFrom
//
this.txtEmailFrom.Location = new System.Drawing.Point(110, 168);
this.txtEmailFrom.Name = "txtEmailFrom";
this.txtEmailFrom.Size = new System.Drawing.Size(179, 20);
this.txtEmailFrom.TabIndex = 30;
this.txtEmailFrom.Text = "info@steamware.net";
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(2, 171);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(63, 13);
this.label19.TabIndex = 29;
this.label19.Text = "From (email)";
//
// txtEmailPwd
//
this.txtEmailPwd.Location = new System.Drawing.Point(110, 135);
this.txtEmailPwd.Name = "txtEmailPwd";
this.txtEmailPwd.PasswordChar = '*';
this.txtEmailPwd.Size = new System.Drawing.Size(179, 20);
this.txtEmailPwd.TabIndex = 28;
this.txtEmailPwd.Text = "vpsad24068";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(2, 138);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(53, 13);
this.label20.TabIndex = 27;
this.label20.Text = "Password";
//
// txtEmailUser
//
this.txtEmailUser.Location = new System.Drawing.Point(110, 102);
this.txtEmailUser.Name = "txtEmailUser";
this.txtEmailUser.Size = new System.Drawing.Size(179, 20);
this.txtEmailUser.TabIndex = 26;
this.txtEmailUser.Text = "services@steamware.net";
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(2, 105);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(55, 13);
this.label21.TabIndex = 25;
this.label21.Text = "Username";
//
// txtServerPort
//
this.txtServerPort.Enabled = false;
this.txtServerPort.Location = new System.Drawing.Point(110, 36);
this.txtServerPort.Name = "txtServerPort";
this.txtServerPort.Size = new System.Drawing.Size(179, 20);
this.txtServerPort.TabIndex = 24;
this.txtServerPort.Text = "25";
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(2, 39);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(58, 13);
this.label22.TabIndex = 23;
this.label22.Text = "SMTP port";
//
// txtSmtpServ
//
this.txtSmtpServ.Location = new System.Drawing.Point(110, 3);
this.txtSmtpServ.Name = "txtSmtpServ";
this.txtSmtpServ.Size = new System.Drawing.Size(179, 20);
this.txtSmtpServ.TabIndex = 22;
this.txtSmtpServ.Text = "smtp.gmail.com";
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(2, 6);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(93, 13);
this.label23.TabIndex = 21;
this.label23.Text = "SMTP server addr";
//
// MainForm
//
@@ -958,6 +1194,8 @@
this.tabPage8.PerformLayout();
this.tabPage9.ResumeLayout(false);
this.tabPage9.PerformLayout();
this.tabPage10.ResumeLayout(false);
this.tabPage10.PerformLayout();
this.ResumeLayout(false);
}
@@ -1039,6 +1277,27 @@
private System.Windows.Forms.Button btnTestUserLoad;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtMatr;
private System.Windows.Forms.TabPage tabPage10;
private System.Windows.Forms.CheckBox chkSSL;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox txtEmailTestOut;
private System.Windows.Forms.Button btnSendEmail;
private System.Windows.Forms.TextBox txtSubj;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox txtMessage;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox txtEmailDest;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.TextBox txtEmailFrom;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtEmailPwd;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.TextBox txtEmailUser;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox txtServerPort;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.TextBox txtSmtpServ;
private System.Windows.Forms.Label label23;
}
}
+51
View File
@@ -8,6 +8,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using NLog;
using System.Xml.Linq;
namespace TestBench
{
@@ -422,5 +423,55 @@ namespace TestBench
}
}
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private bool ParamPresent
{
get
{
bool serverOk = !string.IsNullOrEmpty(txtSmtpServ.Text) && !string.IsNullOrEmpty(txtServerPort.Text);
bool userOk = chkSSL.Checked && (!string.IsNullOrEmpty(txtUser.Text) && !string.IsNullOrEmpty(txtEmailPwd.Text));
bool mailOk = !string.IsNullOrEmpty(txtEmailFrom.Text) && !string.IsNullOrEmpty(txtEmailDest.Text);
bool messOk = !string.IsNullOrEmpty(txtSubj.Text) && !string.IsNullOrEmpty(txtMessage.Text);
return serverOk && userOk && mailOk && messOk;
}
}
private void btnSendEmail_Click(object sender, EventArgs e)
{
try
{
// se ho tutti i valori, altrimenti mostro messaggio...
if (!ParamPresent)
{
txtEmailTestOut.Text = "Mancano parametri per invio, prego completare";
}
else
{
gestEmail emailSend = new gestEmail("");
if (chkSSL.Checked)
{
emailSend = new gestEmail(txtSmtpServ.Text, txtEmailUser.Text, txtEmailPwd.Text);
}
else
{
emailSend = new gestEmail(txtSmtpServ.Text);
}
// invio!
var result = emailSend.mandaEmail(txtEmailFrom.Text, txtEmailDest.Text, txtSubj.Text, txtMessage.Text);
txtEmailTestOut.Text = $"Inviato messaggio, esito: {result}";
}
}
catch(Exception exc)
{
txtEmailTestOut.Text = $"Eccezione in invio:{Environment.NewLine}{exc}";
}
}
private void tabPage10_Enter(object sender, EventArgs e)
{
// imposto setup...
txtServerPort.Text = memLayer.ML.CRS("_PortSSL");
chkSSL.Checked = memLayer.ML.CRB("_enableSSL");
}
}
}