diff --git a/IOB-MAN/App.config b/IOB-MAN/App.config index 80a76d7f..0e849549 100644 --- a/IOB-MAN/App.config +++ b/IOB-MAN/App.config @@ -1,7 +1,7 @@  - + @@ -63,4 +63,4 @@ - \ No newline at end of file + diff --git a/IOB-MAN/App_Readme/README_SteamWare.txt b/IOB-MAN/App_Readme/README_SteamWare.txt new file mode 100644 index 00000000..bf60ed18 --- /dev/null +++ b/IOB-MAN/App_Readme/README_SteamWare.txt @@ -0,0 +1,12 @@ +--------------------------------------------------------------- +------- SteamWareLib SDK ------- +--------------------------------------------------------------- + +Libreria di utility base di SteamWare. + +Le dipendenze inserite sono necessarie al funzionamento dell'SDK. + +Sono inclusi a titolo di esempio vari files di conf: + * example-NLog.config + +Attenzione a configurare correttamente il file NLog.xml includendo il rule per la classe, vedere ad esempio il file example-NLog.config allegato. \ No newline at end of file diff --git a/IOB-MAN/App_Readme/SteamWare_demo/example-favicon.ico b/IOB-MAN/App_Readme/SteamWare_demo/example-favicon.ico new file mode 100644 index 00000000..4f0e0ad0 Binary files /dev/null and b/IOB-MAN/App_Readme/SteamWare_demo/example-favicon.ico differ diff --git a/IOB-MAN/IOB-MAN.csproj b/IOB-MAN/IOB-MAN.csproj index e8e8b1fb..1ac2e0e4 100644 --- a/IOB-MAN/IOB-MAN.csproj +++ b/IOB-MAN/IOB-MAN.csproj @@ -8,11 +8,12 @@ WinExe IOB_MAN IOB-MAN - v4.6.1 + v4.6.2 512 true + AnyCPU @@ -79,6 +80,12 @@ ..\packages\StackExchange.Redis.2.0.601\lib\net461\StackExchange.Redis.dll + + ..\packages\SteamWare.IO.4.0.2002.731\lib\net462\SteamWare.IO.dll + + + ..\packages\SteamWare.Logger.4.0.2002.727\lib\net462\SteamWare.Logger.dll + ..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll @@ -143,7 +150,10 @@ + + + Always @@ -158,6 +168,7 @@ True Resources.resx + True Always diff --git a/IOB-MAN/Properties/Resources.Designer.cs b/IOB-MAN/Properties/Resources.Designer.cs index 8c2539af..e7a49746 100644 --- a/IOB-MAN/Properties/Resources.Designer.cs +++ b/IOB-MAN/Properties/Resources.Designer.cs @@ -1,69 +1,61 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Il codice è stato generato da uno strumento. +// Versione runtime:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se +// il codice viene rigenerato. // //------------------------------------------------------------------------------ -namespace IOB_MAN.Properties -{ - - +namespace IOB_MAN.Properties { + using System; + + /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + // Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder. + // tramite uno strumento quale ResGen o Visual Studio. + // Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen + // con l'opzione /str oppure ricompilare il progetto VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// - /// Returns the cached ResourceManager instance used by this class. + /// Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IOB_MAN.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte le + /// ricerche di risorse eseguite utilizzando questa classe di risorse fortemente tipizzata. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/IOB-MAN/Properties/Settings.Designer.cs b/IOB-MAN/Properties/Settings.Designer.cs index 47a35f95..209334b6 100644 --- a/IOB-MAN/Properties/Settings.Designer.cs +++ b/IOB-MAN/Properties/Settings.Designer.cs @@ -1,28 +1,24 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Il codice è stato generato da uno strumento. +// Versione runtime:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se +// il codice viene rigenerato. // //------------------------------------------------------------------------------ -namespace IOB_MAN.Properties -{ - - +namespace IOB_MAN.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/IOB-MAN/RedisMan.cs b/IOB-MAN/RedisMan.cs index 3f8cf416..5324133a 100644 --- a/IOB-MAN/RedisMan.cs +++ b/IOB-MAN/RedisMan.cs @@ -1,5 +1,6 @@ using Newtonsoft.Json; using StackExchange.Redis; +using SteamWare.Logger; using System; using System.Collections.Generic; using System.Linq; @@ -176,7 +177,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("{0}", exc), tipoLog.EXCEPTION); + Logging.Instance.Error($"redServInfo:{Environment.NewLine}{exc}"); } return answ; } @@ -194,7 +195,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("Errore in getRSV:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); + Logging.Instance.Error($"getRSV:{Environment.NewLine}{exc}"); } return answ; } @@ -214,7 +215,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("Errore in setRSV:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); + Logging.Instance.Error($"setRSV:{Environment.NewLine}{exc}"); } return answ; } @@ -237,7 +238,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("Errore in setRSV:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); + Logging.Instance.Error($"setRSV + ttl:{Environment.NewLine}{exc}"); } return answ; } @@ -255,7 +256,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("Errore in setRCI:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); + Logging.Instance.Error($"setRCntI:{Environment.NewLine}{exc}"); } return answ; } @@ -273,7 +274,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("Errore in setRCD:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); + Logging.Instance.Error($"setRCntD:{Environment.NewLine}{exc}"); } return answ; } @@ -293,7 +294,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("Errore in getRSV:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); + Logging.Instance.Error($"getRCnt:{Environment.NewLine}{exc}"); } return answInt; } @@ -311,7 +312,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("Errore in resetRCnt:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); + Logging.Instance.Error($"resetRCnt:{Environment.NewLine}{exc}"); } return answ; } @@ -329,7 +330,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("Errore in getRKeys:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); + Logging.Instance.Error($"getRKeys:{Environment.NewLine}{exc}"); } return answ; } @@ -348,7 +349,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("Errore in setRKeys:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); + Logging.Instance.Error($"setRKeys:{Environment.NewLine}{exc}"); } return answ; } @@ -367,7 +368,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("Errore in redKeyPresent per la key {2}:{0}{1}", Environment.NewLine, exc, key), tipoLog.EXCEPTION); + Logging.Instance.Error($"redKeyPresent:{Environment.NewLine}{exc}"); } return answ; } @@ -384,8 +385,10 @@ namespace IOB_MAN RedisKey chiave = key; answ = redKeyPresent(chiave); } - catch - { } + catch(Exception exc) + { + Logging.Instance.Error($"redKeyPresentSz:{Environment.NewLine}{exc}"); + } return answ; } /// @@ -403,7 +406,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("Errore in redHashPresent per la key {2}{0}{1}", Environment.NewLine, exc, key), tipoLog.EXCEPTION); + Logging.Instance.Error($"redHashPresent:{Environment.NewLine}{exc}"); } return answ; } @@ -420,8 +423,10 @@ namespace IOB_MAN RedisKey chiave = key; answ = redHashPresent(chiave); } - catch - { } + catch(Exception exc) + { + Logging.Instance.Error($"redHashPresentSz:{Environment.NewLine}{exc}"); + } return answ; } /// @@ -445,8 +450,10 @@ namespace IOB_MAN i++; } } - catch - { } + catch(Exception exc) + { + Logging.Instance.Error($"redGetHash:{Environment.NewLine}{exc}"); + } return answ; } /// @@ -467,8 +474,10 @@ namespace IOB_MAN answ.Add(item.Name, item.Value); } } - catch - { } + catch(Exception exc) + { + Logging.Instance.Error($"redGetHashDict:{Environment.NewLine}{exc}"); + } return answ; } /// @@ -488,8 +497,10 @@ namespace IOB_MAN RedisValue valOut = cache.HashGet(chiave, campo); answ = valOut.ToString(); } - catch - { } + catch(Exception exc) + { + Logging.Instance.Error($"redGetHashField:{Environment.NewLine}{exc}"); + } return answ; } /// @@ -515,8 +526,10 @@ namespace IOB_MAN cache.HashSet(chiave, valori); answ = true; } - catch - { } + catch(Exception exc) + { + Logging.Instance.Error($"redSaveHash:{Environment.NewLine}{exc}"); + } return answ; } /// @@ -542,8 +555,10 @@ namespace IOB_MAN cache.HashSet(chiave, valori); answ = true; } - catch - { } + catch(Exception exc) + { + Logging.Instance.Error($"redSaveHashDict:{Environment.NewLine}{exc}"); + } return answ; } @@ -573,8 +588,10 @@ namespace IOB_MAN cache.HashSet(chiave, valori); answ = true; } - catch - { } + catch(Exception exc) + { + Logging.Instance.Error($"redSaveHashList:{Environment.NewLine}{exc}"); + } } return answ; } @@ -599,8 +616,10 @@ namespace IOB_MAN } //answ = true; } - catch - { } + catch (Exception exc) + { + Logging.Instance.Error($"redSaveHash:{Environment.NewLine}{exc}"); + } return answ; } /// @@ -624,8 +643,10 @@ namespace IOB_MAN } //answ = true; } - catch - { } + catch(Exception exc) + { + Logging.Instance.Error($"redSaveHashDict:{Environment.NewLine}{exc}"); + } return answ; } /// @@ -643,8 +664,10 @@ namespace IOB_MAN cache.KeyDelete(chiave); answ = true; } - catch - { } + catch(Exception exc) + { + Logging.Instance.Error($"redDelKey:{Environment.NewLine}{exc}"); + } return answ; } /// @@ -673,7 +696,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("{0}", exc), tipoLog.EXCEPTION); + Logging.Instance.Error($"redFlushKey:{Environment.NewLine}{exc}"); } return answ; } @@ -701,7 +724,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("{0}", exc), tipoLog.EXCEPTION); + Logging.Instance.Error($"redCountKey:{Environment.NewLine}{exc}"); } return answ; } @@ -722,8 +745,10 @@ namespace IOB_MAN answ += server.DatabaseSize(); } } - catch - { } + catch (Exception exc) + { + Logging.Instance.Error($"numRecRedis:{Environment.NewLine}{exc}"); + } return answ; } } @@ -757,7 +782,7 @@ namespace IOB_MAN } catch (Exception exc) { - //logger.lg.scriviLog(string.Format("{0}", exc), tipoLog.EXCEPTION); + Logging.Instance.Error($"redGetCounterByKey 01:{Environment.NewLine}{exc}"); } // ora recupero valori! var valori = getRKeys(chiavi); @@ -771,8 +796,10 @@ namespace IOB_MAN answ.Add(new KeyValuePair(chiavi[i], currVal)); } } - catch - { } + catch (Exception exc) + { + Logging.Instance.Error($"redGetCounterByKey 02:{Environment.NewLine}{exc}"); + } // se richiesto riordino... switch (orderBy) { diff --git a/IOB-MAN/mongocrypt.dll b/IOB-MAN/mongocrypt.dll new file mode 100644 index 00000000..3cc36341 Binary files /dev/null and b/IOB-MAN/mongocrypt.dll differ diff --git a/IOB-MAN/packages.config b/IOB-MAN/packages.config index 664d6d84..bfbfe039 100644 --- a/IOB-MAN/packages.config +++ b/IOB-MAN/packages.config @@ -17,8 +17,8 @@ - - + +