Ancora code cleanup
This commit is contained in:
@@ -41,7 +41,7 @@ namespace IobConf.Core
|
||||
/// <param name="Key"></param>
|
||||
public void IniDeleteKey(string Section, string Key)
|
||||
{
|
||||
WritePrivateProfileString(Section, Key, null, FileName);
|
||||
WritePrivateProfileString(Section, Key, "", FileName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -50,7 +50,7 @@ namespace IobConf.Core
|
||||
/// <param name="Section"></param>
|
||||
public void IniDeleteSection(string Section)
|
||||
{
|
||||
WritePrivateProfileSection(Section, null, FileName);
|
||||
WritePrivateProfileSection(Section, "", FileName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="NLog" Version="5.1.0" />
|
||||
<PackageReference Include="YamlDotNet" Version="12.3.1" />
|
||||
<PackageReference Include="NLog" Version="5.1.1" />
|
||||
<PackageReference Include="YamlDotNet" Version="13.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
+11
-10
@@ -19,7 +19,9 @@ namespace IobConf.Core
|
||||
/// Init classe configurazione
|
||||
/// </summary>
|
||||
public IobConfTree()
|
||||
{ }
|
||||
{
|
||||
Log = LogManager.GetCurrentClassLogger();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce un oggetto di conf leggendo INI ed effettuando conversione
|
||||
@@ -33,8 +35,8 @@ namespace IobConf.Core
|
||||
{
|
||||
// leggo file INI
|
||||
IniFile fIni = new IniFile(iniFilePath);
|
||||
string codIob= Path.GetFileNameWithoutExtension(iniFilePath);
|
||||
|
||||
string codIob = Path.GetFileNameWithoutExtension(iniFilePath);
|
||||
|
||||
// effettuo conversione...
|
||||
|
||||
// Dati generali (vendor, modello...)
|
||||
@@ -46,13 +48,13 @@ namespace IobConf.Core
|
||||
// tipo adapter// verifico tipo adapter
|
||||
try
|
||||
{
|
||||
newConfObj.IobType = (AdapterType)Enum.Parse(typeof(AdapterType), fIni.ReadString("IOB", "CNCTYPE", "ND"));
|
||||
newConfObj.IobType = (AdapterType)Enum.Parse(typeof(AdapterType), fIni.ReadString("IOB", "CNCTYPE", "ND"));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
newConfObj.IobType = AdapterType.ND;
|
||||
string rawVal = fIni.ReadString("IOB", "CNCTYPE", "DEMO");
|
||||
//newConfObj.lgError($"Eccezione in conversione tipo adapter: richiesto {rawVal} | tipo non codificato...{Environment.NewLine}{exc}");
|
||||
newConfObj.lgError($"Eccezione in conversione tipo adapter: richiesto {rawVal} | tipo non codificato...{Environment.NewLine}{exc}");
|
||||
}
|
||||
newConfObj.GeneralCom = (ComLayer)Enum.Parse(typeof(ComLayer), fIni.ReadString("IOB", "CNCFAMILY", "ND"));
|
||||
|
||||
@@ -72,16 +74,15 @@ namespace IobConf.Core
|
||||
newConfObj.TempoCiclo.MaxIncrPz = Convert.ToDouble(fIni.ReadString("OPTPAR", "TC_MAX_INCR", "5").Replace(".", ","));
|
||||
|
||||
// Server
|
||||
string MpIp=fIni.ReadString("SERVER", "MPIP", "::1");
|
||||
string MpIp = fIni.ReadString("SERVER", "MPIP", "::1");
|
||||
if (!string.IsNullOrEmpty(MpIp))
|
||||
{
|
||||
newConfObj.ServerMES.Transport = MpIp.StartsWith("https://") ? "https" : "http";
|
||||
newConfObj.ServerMES.IpAddr = MpIp.Replace($"{newConfObj.ServerMES.Transport}://", ""); // tolgo http/https...
|
||||
}
|
||||
//newConfObj.ServerMES.Commands.Alive
|
||||
|
||||
|
||||
// Altro (versione, ...)
|
||||
newConfObj.ReleaseVers = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
newConfObj.ReleaseVers = $"{System.Reflection.Assembly.GetExecutingAssembly().GetName().Version}";
|
||||
newConfObj.IobManConf.MinDeltaSec = fIni.ReadInteger("IOB", "MinDeltaSec", 6);
|
||||
|
||||
// OptPar
|
||||
@@ -101,7 +102,7 @@ namespace IobConf.Core
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
//newConfObj.lgError(string.Format("EXCEPTION in fase di lettura OPTPAR: {0}{1}", Environment.NewLine, exc));
|
||||
newConfObj.lgError(string.Format("EXCEPTION in fase di lettura OPTPAR: {0}{1}", Environment.NewLine, exc));
|
||||
}
|
||||
}
|
||||
// riordino alfabeticamente
|
||||
|
||||
@@ -5,19 +5,21 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.9">
|
||||
<PackageReference Include="DiffMatchPatch" Version="1.0.3" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.13" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.13">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.9">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.13" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.13" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.13">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
|
||||
<PackageReference Include="NLog" Version="4.7.11" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.13" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="NLog" Version="5.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.9" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.9" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="5.1.4" />
|
||||
<PackageReference Include="RestSharp" Version="107.1.2" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>6.16.2209.2118</Version>
|
||||
<Version>6.16.2302.1317</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -29,9 +29,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="NLog" Version="5.0.4" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.6.66" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.6.90" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MON MAPO</i>
|
||||
<h4>Versione: 6.16.2209.2118</h4>
|
||||
<h4>Versione: 6.16.2302.1317</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2209.2118
|
||||
6.16.2302.1317
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2209.2118</version>
|
||||
<version>6.16.2302.1317</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/MP.Mon.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>MP.Prog</RootNamespace>
|
||||
<Version>6.16.2212.2917</Version>
|
||||
<Version>6.16.2302.1317</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -17,14 +17,15 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DiffMatchPatch" Version="1.0.3" />
|
||||
<PackageReference Include="Majorsoft.Blazor.Components.Debounce" Version="1.5.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.9">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.13">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.13" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.11" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="NLog" Version="5.1.1" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="5.2.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo gestione Programmi MAPO</i>
|
||||
<h4>Versione: 6.16.2212.2917</h4>
|
||||
<h4>Versione: 6.16.2302.1317</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2212.2917
|
||||
6.16.2302.1317
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2212.2917</version>
|
||||
<version>6.16.2302.1317</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user