Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switched from using 6 small Serializer nugets to one. #279

Merged
merged 2 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Changed to the PcAxis.Serializers nuget package
- Upgraded the Newtonsoft JSON library dependenvis to 13.0.1 due to a vulnerability issue
- Fixed marking tips translation in Swedish
- Fixed shortcut texts for file formats in commandbar
Expand Down
16 changes: 2 additions & 14 deletions PCAxis.Api/PCAxis.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@
<Reference Include="PCAxis.Encryption, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Encryption.1.0.0\lib\netstandard2.0\PCAxis.Encryption.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Excel, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Excel.1.0.2\lib\netstandard2.0\PCAxis.Excel.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Menu, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Menu.1.0.1\lib\netstandard2.0\PCAxis.Menu.dll</HintPath>
</Reference>
Expand All @@ -133,20 +130,11 @@
<Reference Include="PCAxis.Query, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PcAxis.Query.1.0.2\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Sdmx, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Sdmx.1.0.1\lib\netstandard2.0\PCAxis.Sdmx.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Serializers.JsonStat, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Serializers.JsonStat.1.0.5\lib\netstandard2.0\PCAxis.Serializers.JsonStat.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Serializers.JsonStat2, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Serializers.JsonStat2.1.0.1\lib\netstandard2.0\PCAxis.Serializers.JsonStat2.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Sql, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PcAxis.Sql.1.1.3\lib\netstandard2.0\PCAxis.Sql.dll</HintPath>
</Reference>
<Reference Include="PX.Serializers.Json, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PX.Serializers.Json.1.0.1\lib\netstandard2.0\PX.Serializers.Json.dll</HintPath>
<Reference Include="Serializers, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Serializers.1.0.0\lib\netstandard2.0\Serializers.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
Expand Down
2 changes: 1 addition & 1 deletion PCAxis.Api/Serializers/JsonSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class JsonSerializer :IWebSerializer
public void Serialize(PCAxis.Paxiom.PXModel model, ResponseBucket cacheResponse)
{
cacheResponse.ContentType = "application/json; charset=" + System.Text.Encoding.UTF8.WebName;
PCAxis.Paxiom.IPXModelStreamSerializer serializer = new PX.Serializers.Json.JsonSerializer();
PCAxis.Paxiom.IPXModelStreamSerializer serializer = new PCAxis.Serializers.JsonSerializer();

using (System.IO.MemoryStream stream = new System.IO.MemoryStream())
{
Expand Down
2 changes: 1 addition & 1 deletion PCAxis.Api/Serializers/JsonStat2Seriaizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class JsonStat2Seriaizer : IWebSerializer
public void Serialize(PCAxis.Paxiom.PXModel model, ResponseBucket cacheResponse)
{
cacheResponse.ContentType = "application/json; charset=" + System.Text.Encoding.UTF8.WebName;
PCAxis.Paxiom.IPXModelStreamSerializer serializer = new PCAxis.Serializers.JsonStat2.JsonStat2Serializer();
PCAxis.Paxiom.IPXModelStreamSerializer serializer = new PCAxis.Serializers.JsonStat2Serializer();

using (System.IO.MemoryStream stream = new System.IO.MemoryStream())
{
Expand Down
2 changes: 1 addition & 1 deletion PCAxis.Api/Serializers/JsonStatSeriaizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class JsonStatSeriaizer : IWebSerializer
public void Serialize(PCAxis.Paxiom.PXModel model, ResponseBucket cacheResponse)
{
cacheResponse.ContentType = "application/json; charset=" + System.Text.Encoding.UTF8.WebName;
var jsonStatSerializer = new PCAxis.Serializers.JsonStat.JsonStatSerializer();
var jsonStatSerializer = new PCAxis.Serializers.JsonStatSerializer();

var geoVariablesStr = ConfigurationManager.AppSettings["geoVariables"];

Expand Down
2 changes: 1 addition & 1 deletion PCAxis.Api/Serializers/SdmxDataSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SdmxDataSerializer : IWebSerializer
public void Serialize(PCAxis.Paxiom.PXModel model, ResponseBucket cacheResponse)
{
cacheResponse.ContentType = "text/xml; charset=" + System.Text.Encoding.Default.WebName;
PCAxis.Paxiom.IPXModelStreamSerializer serializer = new PCAxis.Sdmx.SdmxDataSerializer();
PCAxis.Paxiom.IPXModelStreamSerializer serializer = new PCAxis.Serializers.SdmxDataSerializer();

using (System.IO.MemoryStream stream = new System.IO.MemoryStream())
{
Expand Down
4 changes: 2 additions & 2 deletions PCAxis.Api/Serializers/XlsxSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class XlsxSerializer : IWebSerializer

public void Serialize(PCAxis.Paxiom.PXModel model, HttpResponse httpResponse)
{
PCAxis.Excel.XlsxSerializer serializer = new PCAxis.Excel.XlsxSerializer();
PCAxis.Serializers.XlsxSerializer serializer = new PCAxis.Serializers.XlsxSerializer();
serializer.InformationLevel = PCAxis.Paxiom.InformationLevelType.AllInformation;
serializer.DoubleColumn = PCAxis.Paxiom.Settings.Files.DoubleColumnFile;
httpResponse.AddHeader("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=" + System.Text.Encoding.Default.WebName);
Expand All @@ -34,7 +34,7 @@ public void Serialize(PCAxis.Paxiom.PXModel model, HttpResponse httpResponse)
public void Serialize(PCAxis.Paxiom.PXModel model, ResponseBucket cacheResponse)
{
cacheResponse.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=" + System.Text.Encoding.Default.WebName;
PCAxis.Excel.XlsxSerializer serializer = new PCAxis.Excel.XlsxSerializer();
PCAxis.Serializers.XlsxSerializer serializer = new PCAxis.Serializers.XlsxSerializer();
serializer.InformationLevel = PCAxis.Paxiom.InformationLevelType.AllInformation;
serializer.DoubleColumn = PCAxis.Paxiom.Settings.Files.DoubleColumnFile;

Expand Down
6 changes: 1 addition & 5 deletions PCAxis.Api/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,15 @@
<package id="PcAxis.Common" version="1.0.2" targetFramework="net461" />
<package id="PcAxis.Core" version="1.0.3" targetFramework="net461" />
<package id="PCAxis.Encryption" version="1.0.0" targetFramework="net461" />
<package id="PCAxis.Excel" version="1.0.2" targetFramework="net461" />
<package id="PCAxis.Menu" version="1.0.1" targetFramework="net461" />
<package id="PCAxis.Menu.ConfigDatamodelMenu" version="1.0.3" targetFramework="net461" />
<package id="PCAxis.Menu.MsSqlDatamodelMenu" version="1.0.1" targetFramework="net461" />
<package id="PCAxis.Menu.OracleDatamodelMenu" version="1.0.1" targetFramework="net461" />
<package id="PCAxis.Metadata" version="1.0.1" targetFramework="net461" />
<package id="PCAxis.PX.Core" version="1.0.2" targetFramework="net461" />
<package id="PcAxis.Query" version="1.0.2" targetFramework="net461" />
<package id="PCAxis.Sdmx" version="1.0.1" targetFramework="net461" />
<package id="PCAxis.Serializers.JsonStat" version="1.0.5" targetFramework="net461" />
<package id="PCAxis.Serializers.JsonStat2" version="1.0.1" targetFramework="net461" />
<package id="PCAxis.Serializers" version="1.0.0" targetFramework="net461" />
<package id="PcAxis.Sql" version="1.1.3" targetFramework="net461" />
<package id="PX.Serializers.Json" version="1.0.1" targetFramework="net461" />
<package id="System.Configuration.ConfigurationManager" version="5.0.0" targetFramework="net461" />
<package id="System.Data.Common" version="4.3.0" targetFramework="net461" />
<package id="System.IdentityModel.Tokens.Jwt" version="5.5.0" targetFramework="net461" />
Expand Down
4 changes: 2 additions & 2 deletions PCAxis.Excel.Web.Controls/ExcelSerializerCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public class ExcelSerializerCreator : PCAxis.Web.Core.ISerializerCreator

public Paxiom.IPXModelStreamSerializer Create(string fileInfo)
{
PCAxis.Excel.XlsxSerializer ser;
ser = new XlsxSerializer();
PCAxis.Serializers.XlsxSerializer ser;
ser = new PCAxis.Serializers.XlsxSerializer();

if (fileInfo.Equals("FileTypeExcelXDoubleColumn"))
{
Expand Down
16 changes: 14 additions & 2 deletions PCAxis.Excel.Web.Controls/PCAxis.Excel.Web.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,23 @@
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Common, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Common.1.0.1\lib\netstandard2.0\PCAxis.Common.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PcAxis.Core.1.0.3\lib\netstandard2.0\PCAxis.Core.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Excel, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Excel.1.0.2\lib\netstandard2.0\PCAxis.Excel.dll</HintPath>
<Reference Include="PCAxis.Metadata, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Metadata.1.0.1\lib\netstandard2.0\PCAxis.Metadata.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Query, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Query.1.0.1\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
</Reference>
<Reference Include="Serializers, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Serializers.1.0.0\lib\netstandard2.0\Serializers.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
4 changes: 2 additions & 2 deletions PCAxis.Excel.Web.Controls/SaveAsXlsx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public override void SerializeAndStream()

using (System.IO.MemoryStream stream = new System.IO.MemoryStream())
{
PCAxis.Excel.XlsxSerializer ser;
ser = new XlsxSerializer();
PCAxis.Serializers.XlsxSerializer ser;
ser = new PCAxis.Serializers.XlsxSerializer();

if (this.SelectedFormat.Equals("FileTypeExcelXDoubleColumn"))
{
Expand Down
6 changes: 5 additions & 1 deletion PCAxis.Excel.Web.Controls/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
<package id="ExcelNumberFormat" version="1.1.0" targetFramework="net461" />
<package id="log4net" version="2.0.12" targetFramework="net461" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net461" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
<package id="PCAxis.Common" version="1.0.1" targetFramework="net461" />
<package id="PcAxis.Core" version="1.0.3" targetFramework="net461" />
<package id="PCAxis.Excel" version="1.0.2" targetFramework="net461" />
<package id="PCAxis.Metadata" version="1.0.1" targetFramework="net461" />
<package id="PCAxis.Query" version="1.0.1" targetFramework="net461" />
<package id="PCAxis.Serializers" version="1.0.0" targetFramework="net461" />
<package id="System.Configuration.ConfigurationManager" version="5.0.0" targetFramework="net461" />
<package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net461" />
<package id="System.IO.Packaging" version="4.0.0" targetFramework="net461" />
Expand Down
4 changes: 2 additions & 2 deletions PCAxis.Html5Table.Web.Controls/Html5TableSerializerCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public class Html5TableSerializerCreator : PCAxis.Web.Core.ISerializerCreator

public Paxiom.IPXModelStreamSerializer Create(string fileInfo)
{
PCAxis.Html5Table.Html5TableSerializer ser;
ser = new Html5TableSerializer();
PCAxis.Serializers.Html5TableSerializer ser;
ser = new PCAxis.Serializers.Html5TableSerializer();

return ser;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,35 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="ClosedXML, Version=0.95.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.95.4\lib\net46\ClosedXML.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=2.7.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.2.7.2\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference>
<Reference Include="ExcelNumberFormat, Version=1.0.10.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL">
<HintPath>..\packages\ExcelNumberFormat.1.0.10\lib\net20\ExcelNumberFormat.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Common, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Common.1.0.1\lib\netstandard2.0\PCAxis.Common.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PcAxis.Core.1.0.3\lib\netstandard2.0\PCAxis.Core.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Html5Table, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Html5Table.1.0.2\lib\netstandard2.0\PCAxis.Html5Table.dll</HintPath>
<Reference Include="PCAxis.Metadata, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Metadata.1.0.1\lib\netstandard2.0\PCAxis.Metadata.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Query, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Query.1.0.1\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
</Reference>
<Reference Include="Serializers, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Serializers.1.0.0\lib\netstandard2.0\Serializers.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand All @@ -48,6 +69,14 @@
<Reference Include="System.Core" />
<Reference Include="System.Data.OracleClient" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.FileSystem.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.FileSystem.Primitives.4.0.1\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Packaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Packaging.4.0.0\lib\net46\System.IO.Packaging.dll</HintPath>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Security" />
<Reference Include="System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
Expand Down
4 changes: 2 additions & 2 deletions PCAxis.Html5Table.Web.Controls/SaveAsHtml5Table.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public override void SerializeAndStream()
{
using (System.IO.MemoryStream stream = new System.IO.MemoryStream())
{
PCAxis.Html5Table.Html5TableSerializer ser;
ser = new Html5TableSerializer();
PCAxis.Serializers.Html5TableSerializer ser;
ser = new PCAxis.Serializers.Html5TableSerializer();


ser.Serialize(PaxiomManager.PaxiomModel, stream);
Expand Down
12 changes: 11 additions & 1 deletion PCAxis.Html5Table.Web.Controls/packages.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ClosedXML" version="0.95.4" targetFramework="net461" />
<package id="DocumentFormat.OpenXml" version="2.7.2" targetFramework="net461" />
<package id="ExcelNumberFormat" version="1.0.10" targetFramework="net461" />
<package id="log4net" version="2.0.12" targetFramework="net461" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net461" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
<package id="PCAxis.Common" version="1.0.1" targetFramework="net461" />
<package id="PcAxis.Core" version="1.0.3" targetFramework="net461" />
<package id="PCAxis.Html5Table" version="1.0.2" targetFramework="net461" />
<package id="PCAxis.Metadata" version="1.0.1" targetFramework="net461" />
<package id="PCAxis.Query" version="1.0.1" targetFramework="net461" />
<package id="PCAxis.Serializers" version="1.0.0" targetFramework="net461" />
<package id="System.Configuration.ConfigurationManager" version="5.0.0" targetFramework="net461" />
<package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net461" />
<package id="System.IO.Packaging" version="4.0.0" targetFramework="net461" />
<package id="System.Security.AccessControl" version="5.0.0" targetFramework="net461" />
<package id="System.Security.Permissions" version="5.0.0" targetFramework="net461" />
<package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net461" />
Expand Down
4 changes: 2 additions & 2 deletions PCAxis.JsonStat.Web.Controls/JsonStatFileType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public override void SerializeAndStream()
{
using (System.IO.MemoryStream stream = new System.IO.MemoryStream())
{
PCAxis.Serializers.JsonStat.JsonStatSerializer ser;
ser = new Serializers.JsonStat.JsonStatSerializer();
PCAxis.Serializers.JsonStatSerializer ser;
ser = new PCAxis.Serializers.JsonStatSerializer();

var geoVariablesStr = ConfigurationManager.AppSettings["geoVariables"];

Expand Down
2 changes: 1 addition & 1 deletion PCAxis.JsonStat.Web.Controls/JsonStatSerializerCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class JsonStatSerializerCreator : PCAxis.Web.Core.ISerializerCreator
{
public PCAxis.Paxiom.IPXModelStreamSerializer Create(string fileInfo)
{
var ser = new PCAxis.Serializers.JsonStat.JsonStatSerializer();
var ser = new PCAxis.Serializers.JsonStatSerializer();

var geoVariablesStr = ConfigurationManager.AppSettings["geoVariables"];

Expand Down
Loading