diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a846f19..fd9d9cf4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ variables: DEPLOY_FOLDER: 'c:\Projects\Deploy\MoonPro\Builds' VERS_MAIN: '6.14' NEW_REL: '' + NEW_DEB: '' NEXUS_PATH: 'MP-XXXX' APP_NAME: 'MP.Xxxx' APP_CONF: 'Release' @@ -92,9 +93,34 @@ variables: - | $env:NEW_REL = $env:VERS_MAIN+"."+(get-date –format yyMM)+"."+(get-date –format dHH) echo "Set vers: $env:NEW_REL" + $anno = (get-date -format yyyy) + $adesso = (get-date -format dd:HH:mm) $contenuto = Get-Content -path 'VersGen\MoonPro.cs' -Raw $newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL $newContenuto | Set-Content -Path 'VersGen\MoonPro.cs' + echo "Modifica dati file nuspec Release" + $currRelease = $env:NEW_REL + $lastDot = $currRelease.LastIndexOf("."); + $currDebug = $currRelease.Substring(0, $lastDot)+"-beta"+$currRelease.Substring($lastDot); + $env:NEW_DEB = $currDebug + $find = "(.|\n)*?"; + $fileNameRel = "MapoSDK.Release.nuspec"; + $replRel = "" + $currRelease + ""; + $replCopy = "Copyright EgalWare, ©2007-" + $anno + $nuspDataRel = Get-Content $fileNameRel; + $nuspDataRelUpd = $nuspDataRel -replace $find, $replRel; + $nuspDataRelUpd = $nuspDataRelUpd -replace "#copyright#", $replCopy; + $nuspDataRelUpd = $nuspDataRelUpd -replace "#releaseNotes#", "Build $adesso"; + Set-Content -Path $fileNameRel -Value $nuspDataRelUpd; + echo "Modifica dati file nuspec Debug" + $fileNameDeb = "MapoSDK.Debug.nuspec"; + $replDeb = "" + $currDebug + ""; + $nuspDataDeb = Get-Content $fileNameDeb; + $nuspDataDebUpd = $nuspDataDeb -replace $find, $replDeb; + $nuspDataDebUpd = $nuspDataDebUpd -replace "#copyright#", $replCopy; + $nuspDataDebUpd = $nuspDataDebUpd -replace "#releaseNotes#", "Build $adesso"; + Set-Content -Path $fileNameDeb -Value $nuspDataDebUpd; + echo "replace completati" stages: - build @@ -104,7 +130,7 @@ stages: - installer -SDK: +SDK-stable: stage: sdk tags: - win @@ -120,11 +146,30 @@ SDK: script: - '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m' - '& Remove-Item *.nupkg' - - '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL' + - '& $env:NUGET_PATH pack MapoSDK.Release.nuspec' - '& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted' - '& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted' - # - *sendSDK - + +SDK-unstable: + stage: sdk + tags: + - win + rules: + - if: '$CI_COMMIT_BRANCH == "develop"' + variables: + APP_NAME: MP-ADM + NEXUS_PATH: MP-ADM + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore MAPO.sln -verbosity quiet' + - *version-fix + script: + - '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Debug /verbosity:minimal /m' + - '& Remove-Item *.nupkg' + - '& $env:NUGET_PATH pack MapoSDK.Debug.nuspec' + - '& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted' + - '& $env:NUGET_PATH push MapoSDK.$env:NEW_DEB.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted' + ADM:build: stage: build variables: diff --git a/MP-ADM/App_Readme/README_SteamWare.txt b/MP-ADM/App_Readme/README_SteamWare.txt index bf60ed18..954eff8b 100644 --- a/MP-ADM/App_Readme/README_SteamWare.txt +++ b/MP-ADM/App_Readme/README_SteamWare.txt @@ -1,5 +1,5 @@ --------------------------------------------------------------- -------- SteamWareLib SDK ------- +------- SteamWare SDK ------- --------------------------------------------------------------- Libreria di utility base di SteamWare. diff --git a/MP-ADM/App_Readme/SteamWare_demo/example-NLog.config b/MP-ADM/App_Readme/SteamWare_demo/example-NLog.config index a11a39e6..3461e583 100644 --- a/MP-ADM/App_Readme/SteamWare_demo/example-NLog.config +++ b/MP-ADM/App_Readme/SteamWare_demo/example-NLog.config @@ -19,13 +19,13 @@ - + \ No newline at end of file diff --git a/MP-ADM/Azienda.aspx b/MP-ADM/Azienda.aspx new file mode 100644 index 00000000..c2fc36ea --- /dev/null +++ b/MP-ADM/Azienda.aspx @@ -0,0 +1,7 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" CodeBehind="Azienda.aspx.cs" Inherits="MP_ADM.Azienda" %> + +<%@ Register Src="~/WebUserControls/cmp_CompanySelector.ascx" TagPrefix="uc1" TagName="cmp_CompanySelector" %> + + + + diff --git a/MP-ADM/Azienda.aspx.cs b/MP-ADM/Azienda.aspx.cs new file mode 100644 index 00000000..a6a91f11 --- /dev/null +++ b/MP-ADM/Azienda.aspx.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace MP_ADM +{ + public partial class Azienda : BasePage + { + #region Protected Methods + + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + ((MoonPro)this.Master).showSearch = false; + } + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/MP-ADM/Azienda.aspx.designer.cs b/MP-ADM/Azienda.aspx.designer.cs new file mode 100644 index 00000000..da432ef3 --- /dev/null +++ b/MP-ADM/Azienda.aspx.designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MP_ADM +{ + + + public partial class Azienda + { + + /// + /// cmp_CompanySelector control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::MP_ADM.WebUserControls.cmp_CompanySelector cmp_CompanySelector; + } +} diff --git a/MP-ADM/MP-ADM.csproj b/MP-ADM/MP-ADM.csproj index 1883e98d..4dac8ff5 100644 --- a/MP-ADM/MP-ADM.csproj +++ b/MP-ADM/MP-ADM.csproj @@ -81,17 +81,20 @@ ..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + + ..\packages\Microsoft.Web.Infrastructure.2.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + ..\packages\Microsoft.Web.RedisSessionStateProvider.4.0.1\lib\net462\Microsoft.Web.RedisSessionStateProvider.dll - - ..\packages\MongoDB.Bson.2.14.1\lib\netstandard2.0\MongoDB.Bson.dll + + ..\packages\MongoDB.Bson.2.15.0\lib\netstandard2.0\MongoDB.Bson.dll - - ..\packages\MongoDB.Driver.2.14.1\lib\netstandard2.0\MongoDB.Driver.dll + + ..\packages\MongoDB.Driver.2.15.0\lib\netstandard2.0\MongoDB.Driver.dll - - ..\packages\MongoDB.Driver.Core.2.14.1\lib\netstandard2.0\MongoDB.Driver.Core.dll + + ..\packages\MongoDB.Driver.Core.2.15.0\lib\netstandard2.0\MongoDB.Driver.Core.dll ..\packages\MongoDB.Libmongocrypt.1.3.0\lib\netstandard2.0\MongoDB.Libmongocrypt.dll @@ -100,7 +103,7 @@ ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.7.13\lib\net45\NLog.dll + ..\packages\NLog.4.7.15\lib\net45\NLog.dll ..\packages\PDFsharp.1.50.5147\lib\net20\PdfSharp.dll @@ -111,20 +114,20 @@ ..\packages\Pipelines.Sockets.Unofficial.2.2.2\lib\net461\Pipelines.Sockets.Unofficial.dll - - ..\packages\SharpCompress.0.30.1\lib\net461\SharpCompress.dll + + ..\packages\SharpCompress.0.31.0\lib\net461\SharpCompress.dll ..\packages\Snappy.NET.1.1.1.8\lib\net45\Snappy.NET.dll - ..\packages\StackExchange.Redis.2.2.88\lib\net461\StackExchange.Redis.dll + ..\packages\StackExchange.Redis.2.5.61\lib\net461\StackExchange.Redis.dll - - ..\packages\SteamWare.5.1.2202.1818\lib\net462\SteamWare.dll + + ..\packages\SteamWare.5.2.2204.2910\lib\net462\SteamWare.dll - - ..\packages\SteamWare.Logger.5.1.2202.1818\lib\net462\SteamWare.Logger.dll + + ..\packages\SteamWare.Logger.5.2.2204.2910\lib\net462\SteamWare.Logger.dll ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll @@ -133,8 +136,8 @@ - - ..\packages\System.Diagnostics.PerformanceCounter.6.0.0\lib\net461\System.Diagnostics.PerformanceCounter.dll + + ..\packages\System.Diagnostics.PerformanceCounter.6.0.1\lib\net461\System.Diagnostics.PerformanceCounter.dll ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll @@ -196,10 +199,6 @@ - - True - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - ..\packages\Microsoft.AspNet.ScriptManager.MSAjax.5.0.0\lib\net45\Microsoft.ScriptManager.MSAjax.dll @@ -235,6 +234,7 @@ + @@ -471,8 +471,10 @@ + + @@ -514,6 +516,10 @@ + + + + @@ -595,12 +601,15 @@ + + + @@ -732,6 +741,13 @@ + + Azienda.aspx + ASPXCodeBehind + + + Azienda.aspx + Barcode.aspx ASPXCodeBehind @@ -924,6 +940,13 @@ MoonPro_noAjax.master + + cmp_CompanySelector.ascx + ASPXCodeBehind + + + cmp_CompanySelector.ascx + cmp_fileUpload.ascx ASPXCodeBehind @@ -1377,13 +1400,13 @@ - + - + - - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/MP-IO/packages.config b/MP-IO/packages.config index 304fb43c..a2d186fd 100644 --- a/MP-IO/packages.config +++ b/MP-IO/packages.config @@ -9,43 +9,43 @@ - - - - + + + + - - - - - - - - - + + + + + + + + + - - + + - - - + + + - - - + + + - + - - - + + + - + diff --git a/MP-MAG/App_Readme/README_SteamWare.txt b/MP-MAG/App_Readme/README_SteamWare.txt index bf60ed18..954eff8b 100644 --- a/MP-MAG/App_Readme/README_SteamWare.txt +++ b/MP-MAG/App_Readme/README_SteamWare.txt @@ -1,5 +1,5 @@ --------------------------------------------------------------- -------- SteamWareLib SDK ------- +------- SteamWare SDK ------- --------------------------------------------------------------- Libreria di utility base di SteamWare. diff --git a/MP-MAG/App_Readme/SteamWare_demo/example-NLog.config b/MP-MAG/App_Readme/SteamWare_demo/example-NLog.config index a11a39e6..3461e583 100644 --- a/MP-MAG/App_Readme/SteamWare_demo/example-NLog.config +++ b/MP-MAG/App_Readme/SteamWare_demo/example-NLog.config @@ -19,13 +19,13 @@ - + \ No newline at end of file diff --git a/MP-MAG/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs b/MP-MAG/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs index 71aa8e80..64b655d1 100644 --- a/MP-MAG/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs +++ b/MP-MAG/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs @@ -20,8 +20,6 @@ namespace MP_MAG.Areas.HelpPage /// public class HelpPageSampleGenerator { - #region Public Constructors - /// /// Initializes a new instance of the class. /// @@ -36,9 +34,10 @@ namespace MP_MAG.Areas.HelpPage }; } - #endregion Public Constructors - - #region Public Properties + /// + /// Gets CLR types that are used as the content of or . + /// + public IDictionary ActualHttpMessageTypes { get; internal set; } /// /// Gets the objects that are used directly as samples for certain actions. @@ -46,9 +45,9 @@ namespace MP_MAG.Areas.HelpPage public IDictionary ActionSamples { get; internal set; } /// - /// Gets CLR types that are used as the content of or . + /// Gets the objects that are serialized as samples by the supported formatters. /// - public IDictionary ActualHttpMessageTypes { get; internal set; } + public IDictionary SampleObjects { get; internal set; } /// /// Gets factories for the objects that the supported formatters will serialize as samples. Processed in order, @@ -63,138 +62,23 @@ namespace MP_MAG.Areas.HelpPage public IList> SampleObjectFactories { get; private set; } /// - /// Gets the objects that are serialized as samples by the supported formatters. + /// Gets the request body samples for a given . /// - public IDictionary SampleObjects { get; internal set; } - - #endregion Public Properties - - #region Private Methods - - // Default factory for sample objects - private static object DefaultSampleObjectFactory(HelpPageSampleGenerator sampleGenerator, Type type) + /// The . + /// The samples keyed by media type. + public IDictionary GetSampleRequests(ApiDescription api) { - // Try to create a default sample object - ObjectGenerator objectGenerator = new ObjectGenerator(); - return objectGenerator.GenerateObject(type); + return GetSample(api, SampleDirection.Request); } - private static bool IsFormatSupported(SampleDirection sampleDirection, MediaTypeFormatter formatter, Type type) - { - switch (sampleDirection) - { - case SampleDirection.Request: - return formatter.CanReadType(type); - - case SampleDirection.Response: - return formatter.CanWriteType(type); - } - return false; - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Handling the failure by returning the original string.")] - private static string TryFormatJson(string str) - { - try - { - object parsedJson = JsonConvert.DeserializeObject(str); - return JsonConvert.SerializeObject(parsedJson, Formatting.Indented); - } - catch - { - // can't parse JSON, return the original string - return str; - } - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Handling the failure by returning the original string.")] - private static string TryFormatXml(string str) - { - try - { - XDocument xml = XDocument.Parse(str); - return xml.ToString(); - } - catch - { - // can't parse XML, return the original string - return str; - } - } - - private static object WrapSampleIfString(object sample) - { - string stringSample = sample as string; - if (stringSample != null) - { - return new TextSample(stringSample); - } - - return sample; - } - - private IEnumerable> GetAllActionSamples(string controllerName, string actionName, IEnumerable parameterNames, SampleDirection sampleDirection) - { - HashSet parameterNamesSet = new HashSet(parameterNames, StringComparer.OrdinalIgnoreCase); - foreach (var sample in ActionSamples) - { - HelpPageSampleKey sampleKey = sample.Key; - if (String.Equals(controllerName, sampleKey.ControllerName, StringComparison.OrdinalIgnoreCase) && - String.Equals(actionName, sampleKey.ActionName, StringComparison.OrdinalIgnoreCase) && - (sampleKey.ParameterNames.SetEquals(new[] { "*" }) || parameterNamesSet.SetEquals(sampleKey.ParameterNames)) && - sampleDirection == sampleKey.SampleDirection) - { - yield return sample; - } - } - } - - #endregion Private Methods - - #region Internal Methods - - internal static Exception UnwrapException(Exception exception) - { - AggregateException aggregateException = exception as AggregateException; - if (aggregateException != null) - { - return aggregateException.Flatten().InnerException; - } - return exception; - } - - #endregion Internal Methods - - #region Public Methods - /// - /// Search for samples that are provided directly through . + /// Gets the response body samples for a given . /// - /// Name of the controller. - /// Name of the action. - /// The parameter names. - /// The CLR type. - /// The formatter. - /// The media type. - /// The value indicating whether the sample is for a request or for a response. - /// The sample that matches the parameters. - public virtual object GetActionSample(string controllerName, string actionName, IEnumerable parameterNames, Type type, MediaTypeFormatter formatter, MediaTypeHeaderValue mediaType, SampleDirection sampleDirection) + /// The . + /// The samples keyed by media type. + public IDictionary GetSampleResponses(ApiDescription api) { - object sample; - - // First, try to get the sample provided for the specified mediaType, sampleDirection, controllerName, actionName and parameterNames. - // If not found, try to get the sample provided for the specified mediaType, sampleDirection, controllerName and actionName regardless of the parameterNames. - // If still not found, try to get the sample provided for the specified mediaType and type. - // Finally, try to get the sample provided for the specified mediaType. - if (ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType, sampleDirection, controllerName, actionName, parameterNames), out sample) || - ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType, sampleDirection, controllerName, actionName, new[] { "*" }), out sample) || - ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType, type), out sample) || - ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType), out sample)) - { - return sample; - } - - return null; + return GetSample(api, SampleDirection.Response); } /// @@ -252,7 +136,37 @@ namespace MP_MAG.Areas.HelpPage } /// - /// Gets the sample object that will be serialized by the formatters. + /// Search for samples that are provided directly through . + /// + /// Name of the controller. + /// Name of the action. + /// The parameter names. + /// The CLR type. + /// The formatter. + /// The media type. + /// The value indicating whether the sample is for a request or for a response. + /// The sample that matches the parameters. + public virtual object GetActionSample(string controllerName, string actionName, IEnumerable parameterNames, Type type, MediaTypeFormatter formatter, MediaTypeHeaderValue mediaType, SampleDirection sampleDirection) + { + object sample; + + // First, try to get the sample provided for the specified mediaType, sampleDirection, controllerName, actionName and parameterNames. + // If not found, try to get the sample provided for the specified mediaType, sampleDirection, controllerName and actionName regardless of the parameterNames. + // If still not found, try to get the sample provided for the specified mediaType and type. + // Finally, try to get the sample provided for the specified mediaType. + if (ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType, sampleDirection, controllerName, actionName, parameterNames), out sample) || + ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType, sampleDirection, controllerName, actionName, new[] { "*" }), out sample) || + ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType, type), out sample) || + ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType), out sample)) + { + return sample; + } + + return null; + } + + /// + /// Gets the sample object that will be serialized by the formatters. /// First, it will look at the . If no sample object is found, it will try to create /// one using (which wraps an ) and other /// factories in . @@ -293,26 +207,6 @@ namespace MP_MAG.Areas.HelpPage return sampleObject; } - /// - /// Gets the request body samples for a given . - /// - /// The . - /// The samples keyed by media type. - public IDictionary GetSampleRequests(ApiDescription api) - { - return GetSample(api, SampleDirection.Request); - } - - /// - /// Gets the response body samples for a given . - /// - /// The . - /// The samples keyed by media type. - public IDictionary GetSampleResponses(ApiDescription api) - { - return GetSample(api, SampleDirection.Response); - } - /// /// Resolves the actual type of passed to the in an action. /// @@ -371,7 +265,6 @@ namespace MP_MAG.Areas.HelpPage type = requestBodyParameter == null ? null : requestBodyParameter.ParameterDescriptor.ParameterType; formatters = api.SupportedRequestBodyFormatters; break; - case SampleDirection.Response: default: type = api.ResponseDescription.ResponseType ?? api.ResponseDescription.DeclaredType; @@ -426,7 +319,6 @@ namespace MP_MAG.Areas.HelpPage } sample = new TextSample(serializedSampleString); - reader.Dispose(); } else { @@ -462,6 +354,91 @@ namespace MP_MAG.Areas.HelpPage return sample; } - #endregion Public Methods + internal static Exception UnwrapException(Exception exception) + { + AggregateException aggregateException = exception as AggregateException; + if (aggregateException != null) + { + return aggregateException.Flatten().InnerException; + } + return exception; + } + + // Default factory for sample objects + private static object DefaultSampleObjectFactory(HelpPageSampleGenerator sampleGenerator, Type type) + { + // Try to create a default sample object + ObjectGenerator objectGenerator = new ObjectGenerator(); + return objectGenerator.GenerateObject(type); + } + + [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Handling the failure by returning the original string.")] + private static string TryFormatJson(string str) + { + try + { + object parsedJson = JsonConvert.DeserializeObject(str); + return JsonConvert.SerializeObject(parsedJson, Formatting.Indented); + } + catch + { + // can't parse JSON, return the original string + return str; + } + } + + [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Handling the failure by returning the original string.")] + private static string TryFormatXml(string str) + { + try + { + XDocument xml = XDocument.Parse(str); + return xml.ToString(); + } + catch + { + // can't parse XML, return the original string + return str; + } + } + + private static bool IsFormatSupported(SampleDirection sampleDirection, MediaTypeFormatter formatter, Type type) + { + switch (sampleDirection) + { + case SampleDirection.Request: + return formatter.CanReadType(type); + case SampleDirection.Response: + return formatter.CanWriteType(type); + } + return false; + } + + private IEnumerable> GetAllActionSamples(string controllerName, string actionName, IEnumerable parameterNames, SampleDirection sampleDirection) + { + HashSet parameterNamesSet = new HashSet(parameterNames, StringComparer.OrdinalIgnoreCase); + foreach (var sample in ActionSamples) + { + HelpPageSampleKey sampleKey = sample.Key; + if (String.Equals(controllerName, sampleKey.ControllerName, StringComparison.OrdinalIgnoreCase) && + String.Equals(actionName, sampleKey.ActionName, StringComparison.OrdinalIgnoreCase) && + (sampleKey.ParameterNames.SetEquals(new[] { "*" }) || parameterNamesSet.SetEquals(sampleKey.ParameterNames)) && + sampleDirection == sampleKey.SampleDirection) + { + yield return sample; + } + } + } + + private static object WrapSampleIfString(object sample) + { + string stringSample = sample as string; + if (stringSample != null) + { + return new TextSample(stringSample); + } + + return sample; + } } } \ No newline at end of file diff --git a/MP-MAG/Areas/HelpPage/Views/Help/Index.cshtml b/MP-MAG/Areas/HelpPage/Views/Help/Index.cshtml index 583f0f3e..ba100d04 100644 --- a/MP-MAG/Areas/HelpPage/Views/Help/Index.cshtml +++ b/MP-MAG/Areas/HelpPage/Views/Help/Index.cshtml @@ -6,41 +6,33 @@ @model Collection @{ - ViewBag.Title = "ASP.NET Web API Help Page"; + ViewBag.Title = "ASP.NET Web API Help Page"; - // Group APIs by controller - ILookup apiGroups = Model.ToLookup(api => api.ActionDescriptor.ControllerDescriptor); + // Group APIs by controller + ILookup apiGroups = Model.ToLookup(api => api.ActionDescriptor.ControllerDescriptor); } -
-
-
-
+
+
-

@ViewBag.Title

+

@ViewBag.Title

-
-
-
-
-
-
-
-
+ +
+ -
+
+
@foreach (var group in apiGroups) { - @Html.DisplayFor(m => group, "ApiGroup") + @Html.DisplayFor(m => group, "ApiGroup") } -
-
-
-
\ No newline at end of file +
+ diff --git a/MP-MAG/Areas/HelpPage/Views/Web.config b/MP-MAG/Areas/HelpPage/Views/Web.config index e94f4d66..6d4ddaf1 100644 --- a/MP-MAG/Areas/HelpPage/Views/Web.config +++ b/MP-MAG/Areas/HelpPage/Views/Web.config @@ -1,41 +1,41 @@  - - -
-
- - + + +
+
+ + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - - - - - - + + + + + + + - - - - - - - \ No newline at end of file + + + + + + + diff --git a/MP-MAG/Areas/HelpPage/Views/_ViewStart.cshtml b/MP-MAG/Areas/HelpPage/Views/_ViewStart.cshtml index d735b1cb..a9259508 100644 --- a/MP-MAG/Areas/HelpPage/Views/_ViewStart.cshtml +++ b/MP-MAG/Areas/HelpPage/Views/_ViewStart.cshtml @@ -1,4 +1,4 @@ -@{ - // Change the Layout path below to blend the look and feel of the help page with your existing web pages - Layout = "~/Views/Shared/_Layout.cshtml"; +@{ + // Change the Layout path below to blend the look and feel of the help page with your existing web pages. + Layout = "~/Areas/HelpPage/Views/Shared/_Layout.cshtml"; } \ No newline at end of file diff --git a/MP-MAG/MP-MAG.csproj b/MP-MAG/MP-MAG.csproj index bc8005c3..5748f1c4 100644 --- a/MP-MAG/MP-MAG.csproj +++ b/MP-MAG/MP-MAG.csproj @@ -90,17 +90,20 @@ ..\packages\Microsoft.AspNet.ScriptManager.WebForms.5.0.0\lib\net45\Microsoft.ScriptManager.WebForms.dll + + ..\packages\Microsoft.Web.Infrastructure.2.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + ..\packages\Microsoft.Web.RedisSessionStateProvider.4.0.1\lib\net462\Microsoft.Web.RedisSessionStateProvider.dll - - ..\packages\MongoDB.Bson.2.14.1\lib\netstandard2.0\MongoDB.Bson.dll + + ..\packages\MongoDB.Bson.2.15.0\lib\netstandard2.0\MongoDB.Bson.dll - - ..\packages\MongoDB.Driver.2.14.1\lib\netstandard2.0\MongoDB.Driver.dll + + ..\packages\MongoDB.Driver.2.15.0\lib\netstandard2.0\MongoDB.Driver.dll - - ..\packages\MongoDB.Driver.Core.2.14.1\lib\netstandard2.0\MongoDB.Driver.Core.dll + + ..\packages\MongoDB.Driver.Core.2.15.0\lib\netstandard2.0\MongoDB.Driver.Core.dll ..\packages\MongoDB.Libmongocrypt.1.3.0\lib\netstandard2.0\MongoDB.Libmongocrypt.dll @@ -109,7 +112,7 @@ ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.7.13\lib\net45\NLog.dll + ..\packages\NLog.4.7.15\lib\net45\NLog.dll ..\packages\PDFsharp.1.50.5147\lib\net20\PdfSharp.dll @@ -120,31 +123,31 @@ ..\packages\Pipelines.Sockets.Unofficial.2.2.2\lib\net461\Pipelines.Sockets.Unofficial.dll - - ..\packages\SharpCompress.0.30.1\lib\net461\SharpCompress.dll + + ..\packages\SharpCompress.0.31.0\lib\net461\SharpCompress.dll ..\packages\Snappy.NET.1.1.1.8\lib\net45\Snappy.NET.dll - ..\packages\StackExchange.Redis.2.2.88\lib\net461\StackExchange.Redis.dll + ..\packages\StackExchange.Redis.2.5.61\lib\net461\StackExchange.Redis.dll - - ..\packages\SteamWare.5.1.2202.1818\lib\net462\SteamWare.dll + + ..\packages\SteamWare.5.2.2204.2910\lib\net462\SteamWare.dll - - ..\packages\SteamWare.Logger.5.1.2202.1818\lib\net462\SteamWare.Logger.dll + + ..\packages\SteamWare.Logger.5.2.2204.2910\lib\net462\SteamWare.Logger.dll - - ..\packages\SteamWare.Reports.5.1.2202.1818\lib\net462\SteamWare.Reports.dll + + ..\packages\SteamWare.Reports.5.2.2204.2910\lib\net462\SteamWare.Reports.dll ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - ..\packages\System.Diagnostics.PerformanceCounter.6.0.0\lib\net461\System.Diagnostics.PerformanceCounter.dll + + ..\packages\System.Diagnostics.PerformanceCounter.6.0.1\lib\net461\System.Diagnostics.PerformanceCounter.dll @@ -159,6 +162,9 @@ ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll + + ..\packages\Microsoft.AspNet.WebApi.Client.5.2.8\lib\net45\System.Net.Http.Formatting.dll + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll @@ -204,7 +210,31 @@ + + ..\packages\Microsoft.AspNet.WebPages.3.2.8\lib\net45\System.Web.Helpers.dll + + + ..\packages\Microsoft.AspNet.WebApi.Core.5.2.8\lib\net45\System.Web.Http.dll + + + ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.8\lib\net45\System.Web.Http.WebHost.dll + + + ..\packages\Microsoft.AspNet.Mvc.5.2.8\lib\net45\System.Web.Mvc.dll + + + ..\packages\Microsoft.AspNet.Razor.3.2.8\lib\net45\System.Web.Razor.dll + + + ..\packages\Microsoft.AspNet.WebPages.3.2.8\lib\net45\System.Web.WebPages.dll + + + ..\packages\Microsoft.AspNet.WebPages.3.2.8\lib\net45\System.Web.WebPages.Deployment.dll + + + ..\packages\Microsoft.AspNet.WebPages.3.2.8\lib\net45\System.Web.WebPages.Razor.dll + @@ -212,48 +242,11 @@ - - True - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll - - - True - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll - - - ..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll - - - ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll - - - True - ..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll - ..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll - - True - ..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll - - - True - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll - - - True - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll - - - True - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll - True ..\packages\WebGrease.1.6.0\lib\WebGrease.dll @@ -299,9 +292,7 @@ - - ASPXCodeBehind - + ASPXCodeBehind @@ -316,7 +307,6 @@ jumper.aspx - ASPXCodeBehind jumper.aspx @@ -338,7 +328,6 @@ Default.aspx - ASPXCodeBehind Default.aspx @@ -352,56 +341,48 @@ EnrollDevice.aspx - ASPXCodeBehind EnrollDevice.aspx jumper.aspx - ASPXCodeBehind jumper.aspx login.aspx - ASPXCodeBehind login.aspx packList.aspx - ASPXCodeBehind packList.aspx PLScanner.aspx - ASPXCodeBehind PLScanner.aspx printCartOdl.aspx - ASPXCodeBehind printCartOdl.aspx Reset.aspx - ASPXCodeBehind Reset.aspx SmartStarter.aspx - ASPXCodeBehind SmartStarter.aspx @@ -415,7 +396,6 @@ tryLogin.aspx - ASPXCodeBehind tryLogin.aspx @@ -443,35 +423,30 @@ elencoLotti.aspx - ASPXCodeBehind elencoLotti.aspx prtFiniti.aspx - ASPXCodeBehind prtFiniti.aspx gestPedane.aspx - ASPXCodeBehind gestPedane.aspx prtSemilav.aspx - ASPXCodeBehind prtSemilav.aspx menu.aspx - ASPXCodeBehind menu.aspx @@ -801,24 +776,7 @@ - - - - - - - - - - - - - - - - - Always @@ -827,6 +785,8 @@ + + Always @@ -882,10 +842,31 @@ + + + + + + + + + + + + + + + + + + + + + @@ -931,6 +912,8 @@ + + @@ -1184,14 +1167,14 @@ - + - + - - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + \ No newline at end of file diff --git a/MP-MAG/packages.config b/MP-MAG/packages.config index 650ff122..7ab9a81f 100644 --- a/MP-MAG/packages.config +++ b/MP-MAG/packages.config @@ -14,51 +14,51 @@ - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - + + - - - + + + - + - + - - - - + + + + - + diff --git a/MP-Site/App_Readme/README_SteamWare.txt b/MP-Site/App_Readme/README_SteamWare.txt index bf60ed18..954eff8b 100644 --- a/MP-Site/App_Readme/README_SteamWare.txt +++ b/MP-Site/App_Readme/README_SteamWare.txt @@ -1,5 +1,5 @@ --------------------------------------------------------------- -------- SteamWareLib SDK ------- +------- SteamWare SDK ------- --------------------------------------------------------------- Libreria di utility base di SteamWare. diff --git a/MP-Site/App_Readme/SteamWare_demo/example-NLog.config b/MP-Site/App_Readme/SteamWare_demo/example-NLog.config index a11a39e6..3461e583 100644 --- a/MP-Site/App_Readme/SteamWare_demo/example-NLog.config +++ b/MP-Site/App_Readme/SteamWare_demo/example-NLog.config @@ -19,13 +19,13 @@ - + \ No newline at end of file diff --git a/MP-Site/MP-Site.csproj b/MP-Site/MP-Site.csproj index b2c6dff5..4a6b9dc6 100644 --- a/MP-Site/MP-Site.csproj +++ b/MP-Site/MP-Site.csproj @@ -77,17 +77,20 @@ ..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + + ..\packages\Microsoft.Web.Infrastructure.2.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + ..\packages\Microsoft.Web.RedisSessionStateProvider.4.0.1\lib\net462\Microsoft.Web.RedisSessionStateProvider.dll - - ..\packages\MongoDB.Bson.2.14.1\lib\netstandard2.0\MongoDB.Bson.dll + + ..\packages\MongoDB.Bson.2.15.0\lib\netstandard2.0\MongoDB.Bson.dll - - ..\packages\MongoDB.Driver.2.14.1\lib\netstandard2.0\MongoDB.Driver.dll + + ..\packages\MongoDB.Driver.2.15.0\lib\netstandard2.0\MongoDB.Driver.dll - - ..\packages\MongoDB.Driver.Core.2.14.1\lib\netstandard2.0\MongoDB.Driver.Core.dll + + ..\packages\MongoDB.Driver.Core.2.15.0\lib\netstandard2.0\MongoDB.Driver.Core.dll ..\packages\MongoDB.Libmongocrypt.1.3.0\lib\netstandard2.0\MongoDB.Libmongocrypt.dll @@ -96,7 +99,7 @@ ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.7.13\lib\net45\NLog.dll + ..\packages\NLog.4.7.15\lib\net45\NLog.dll ..\packages\PDFsharp.1.50.5147\lib\net20\PdfSharp.dll @@ -107,20 +110,20 @@ ..\packages\Pipelines.Sockets.Unofficial.2.2.2\lib\net461\Pipelines.Sockets.Unofficial.dll - - ..\packages\SharpCompress.0.30.1\lib\net461\SharpCompress.dll + + ..\packages\SharpCompress.0.31.0\lib\net461\SharpCompress.dll ..\packages\Snappy.NET.1.1.1.8\lib\net45\Snappy.NET.dll - ..\packages\StackExchange.Redis.2.2.88\lib\net461\StackExchange.Redis.dll + ..\packages\StackExchange.Redis.2.5.61\lib\net461\StackExchange.Redis.dll - - ..\packages\SteamWare.5.1.2202.1818\lib\net462\SteamWare.dll + + ..\packages\SteamWare.5.2.2204.2910\lib\net462\SteamWare.dll - - ..\packages\SteamWare.Logger.5.1.2202.1818\lib\net462\SteamWare.Logger.dll + + ..\packages\SteamWare.Logger.5.2.2204.2910\lib\net462\SteamWare.Logger.dll ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll @@ -130,8 +133,8 @@ - - ..\packages\System.Diagnostics.PerformanceCounter.6.0.0\lib\net461\System.Diagnostics.PerformanceCounter.dll + + ..\packages\System.Diagnostics.PerformanceCounter.6.0.1\lib\net461\System.Diagnostics.PerformanceCounter.dll ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll @@ -196,10 +199,6 @@ - - True - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - ..\packages\Microsoft.AspNet.ScriptManager.MSAjax.5.0.0\lib\net45\Microsoft.ScriptManager.MSAjax.dll @@ -312,8 +311,10 @@ + + @@ -356,6 +357,10 @@ + + + + @@ -440,6 +445,8 @@ + + @@ -1061,14 +1068,14 @@ - + - + 12,34 con factor=100) + /// Fattore per eventuale scalatura (es leggo 1234 --> 12,34 con factor=0.01, 123'400 con factor=100) /// - public int factor { get; set; } = 1; + public double factor { get; set; } = 1; /// /// Indice nell'area di memoria (da valore iniziale = 0) diff --git a/VersGen/MoonPro.cs b/VersGen/MoonPro.cs index 395f4dbd..d935ce48 100644 --- a/VersGen/MoonPro.cs +++ b/VersGen/MoonPro.cs @@ -7,5 +7,5 @@ using System.Reflection; [assembly: AssemblyVersion("0.0.0.0")] [assembly: AssemblyFileVersion("0.0.0.0")] -[assembly: AssemblyCopyright("SteamWare-EgalWare © 2007+")] +[assembly: AssemblyCopyright("SteamWare & EgalWare © 2007+")] [assembly: AssemblyCompany("EgalWare")] diff --git a/VersGen/MoonPro.tt b/VersGen/MoonPro.tt index bbca491c..7c6e8885 100644 --- a/VersGen/MoonPro.tt +++ b/VersGen/MoonPro.tt @@ -8,5 +8,5 @@ using System.Reflection; [assembly: AssemblyVersion("0.0.0.0")] [assembly: AssemblyFileVersion("0.0.0.0")] -[assembly: AssemblyCopyright("SteamWare-EgalWare © 2007+")] +[assembly: AssemblyCopyright("SteamWare & EgalWare © 2007+")] [assembly: AssemblyCompany("EgalWare")]