diff --git a/CHANGELOG b/CHANGELOG
index 93f647b..ec296cb 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+v4.2.0
+- Library:
+ - Refactoring: moved Serializations namespace to NW.Shared.Serialization.
+
v4.1.0
- Library:
- Refactoring: moved Files and Validation to NW.Shared.Files and NW.Shared.Validation.
diff --git a/build.ps1 b/build.ps1
index 82622ff..d2ca2a2 100644
--- a/build.ps1
+++ b/build.ps1
@@ -1,6 +1,6 @@
<#
- Title: build_client.ps1
+ Title: build.ps1
Author: numbworks@gmail.com
Last Update: 27.09.2022
Description:
diff --git a/codecoverage_library.svg b/codecoverage_library.svg
index f0ecfbd..1c7d309 100644
--- a/codecoverage_library.svg
+++ b/codecoverage_library.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/codecoverage_library.txt b/codecoverage_library.txt
index 05ee472..ff7a04f 100644
--- a/codecoverage_library.txt
+++ b/codecoverage_library.txt
@@ -1 +1 @@
-https://img.shields.io/badge/coverage-97.86%25-green
\ No newline at end of file
+https://img.shields.io/badge/coverage-92.72%25-green
\ No newline at end of file
diff --git a/src/NW.UnivariateForecasting/Bags/ComponentBag.cs b/src/NW.UnivariateForecasting/Bags/ComponentBag.cs
index 163d6aa..6d27f2f 100644
--- a/src/NW.UnivariateForecasting/Bags/ComponentBag.cs
+++ b/src/NW.UnivariateForecasting/Bags/ComponentBag.cs
@@ -4,7 +4,7 @@
using NW.Shared.Files;
using NW.UnivariateForecasting.Forecasts;
using NW.UnivariateForecasting.Observations;
-using NW.UnivariateForecasting.Serializations;
+using NW.Shared.Serialization;
using NW.UnivariateForecasting.SlidingWindows;
using NW.Shared.Validation;
diff --git a/src/NW.UnivariateForecasting/NW.UnivariateForecasting.csproj b/src/NW.UnivariateForecasting/NW.UnivariateForecasting.csproj
index 5d24865..251c736 100644
--- a/src/NW.UnivariateForecasting/NW.UnivariateForecasting.csproj
+++ b/src/NW.UnivariateForecasting/NW.UnivariateForecasting.csproj
@@ -13,15 +13,16 @@
https://raw.githubusercontent.com/numbworks/numbworks/master/numbworks_logo_128x128px.png
- 4.1.0
- 4.1.0.0
- 4.1.0.0
+ 4.2.0
+ 4.2.0.0
+ 4.2.0.0
+
diff --git a/src/NW.UnivariateForecasting/Serializations/ISerializer.cs b/src/NW.UnivariateForecasting/Serializations/ISerializer.cs
deleted file mode 100644
index ab167e0..0000000
--- a/src/NW.UnivariateForecasting/Serializations/ISerializer.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace NW.UnivariateForecasting.Serializations
-{
- /// A general purpose serializer for this library.
- public interface ISerializer
- {
-
- ///
- /// Serializes the provided object of type T to a Json string.
- ///
- ///
- string Serialize(T obj);
-
- ///
- /// Deserializes the provided Json string to an object of type T.
- /// If is null/empty/invalid or an exception is thrown, default of T will be returned.
- ///
- T DeserializeOrDefault(string json);
-
- }
-}
-
-/*
- Author: numbworks@gmail.com
- Last Update: 14.02.2023
-*/
\ No newline at end of file
diff --git a/src/NW.UnivariateForecasting/Serializations/ISerializerFactory.cs b/src/NW.UnivariateForecasting/Serializations/ISerializerFactory.cs
deleted file mode 100644
index a31dcaf..0000000
--- a/src/NW.UnivariateForecasting/Serializations/ISerializerFactory.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-namespace NW.UnivariateForecasting.Serializations
-{
- /// A factory for .
- public interface ISerializerFactory
- {
-
- /// Creates a instance.
- ISerializer Create();
-
- }
-}
-
-/*
- Author: numbworks@gmail.com
- Last Update: 12.02.2023
-*/
\ No newline at end of file
diff --git a/src/NW.UnivariateForecasting/Serializations/Serializer.cs b/src/NW.UnivariateForecasting/Serializations/Serializer.cs
deleted file mode 100644
index 74e16c8..0000000
--- a/src/NW.UnivariateForecasting/Serializations/Serializer.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-using System;
-using System.Text.Encodings.Web;
-using System.Text.Json;
-using NW.Shared.Validation;
-
-namespace NW.UnivariateForecasting.Serializations
-{
- ///
- public class Serializer : ISerializer
- {
-
- #region Fields
-
- #endregion
-
- #region Properties
-
- #endregion
-
- #region Constructors
-
- /// Initializes a instance using default parameters.
- public Serializer() { }
-
- #endregion
-
- #region Methods_public
-
- public string Serialize(T obj)
- {
-
- Validator.ValidateObject(obj, nameof(obj));
-
- string json = JsonSerializer.Serialize(obj, CreateJsonSerializerOptions());
-
- return json;
-
- }
- public T DeserializeOrDefault(string json)
- {
-
- try
- {
-
- T obj = JsonSerializer.Deserialize(json, CreateJsonSerializerOptions());
-
- return obj;
-
- }
- catch
- {
-
- return default(T);
-
- }
-
- }
-
- #endregion
-
- #region Methods_private
-
- private JsonSerializerOptions CreateJsonSerializerOptions()
- {
-
- JsonSerializerOptions options = new JsonSerializerOptions();
-
- options.Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping;
- options.WriteIndented = true;
-
- return options;
-
- }
-
- #endregion
-
- }
-}
-
-/*
- Author: numbworks@gmail.com
- Last Update: 14.02.2023
-*/
\ No newline at end of file
diff --git a/src/NW.UnivariateForecasting/Serializations/SerializerFactory.cs b/src/NW.UnivariateForecasting/Serializations/SerializerFactory.cs
deleted file mode 100644
index 3fc0afd..0000000
--- a/src/NW.UnivariateForecasting/Serializations/SerializerFactory.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-namespace NW.UnivariateForecasting.Serializations
-{
- ///
- public class SerializerFactory : ISerializerFactory
- {
-
- #region Fields
-
- #endregion
-
- #region Properties
-
- #endregion
-
- #region Constructors
-
- /// Initializes a instance using default parameters.
- public SerializerFactory() { }
-
- #endregion
-
- #region Methods_public
-
- public ISerializer Create()
- {
-
- return new Serializer();
-
- }
-
- #endregion
-
- #region Methods_private
-
- #endregion
-
- }
-}
-
-/*
- Author: numbworks@gmail.com
- Last Update: 12.02.2023
-*/
\ No newline at end of file
diff --git a/src/NW.UnivariateForecasting/UnivariateForecaster.cs b/src/NW.UnivariateForecasting/UnivariateForecaster.cs
index de43ae3..f1fb71f 100644
--- a/src/NW.UnivariateForecasting/UnivariateForecaster.cs
+++ b/src/NW.UnivariateForecasting/UnivariateForecaster.cs
@@ -3,11 +3,11 @@
using System.Linq;
using System.Reflection;
using NW.UnivariateForecasting.Bags;
-using NW.Shared.Files;
using NW.UnivariateForecasting.Forecasts;
using NW.UnivariateForecasting.Observations;
-using NW.UnivariateForecasting.Serializations;
using NW.UnivariateForecasting.SlidingWindows;
+using NW.Shared.Files;
+using NW.Shared.Serialization;
using NW.Shared.Validation;
using NW.Shared.Files.Validation;
@@ -233,5 +233,5 @@ private ForecastingInit DuplicateInit(ForecastingInit init)
/*
Author: numbworks@gmail.com
- Last Update: 08.02.2024
+ Last Update: 14.02.2024
*/
diff --git a/src/NW.UnivariateForecastingClient/NW.UnivariateForecastingClient.csproj b/src/NW.UnivariateForecastingClient/NW.UnivariateForecastingClient.csproj
index b26b52f..b14e53d 100644
--- a/src/NW.UnivariateForecastingClient/NW.UnivariateForecastingClient.csproj
+++ b/src/NW.UnivariateForecastingClient/NW.UnivariateForecastingClient.csproj
@@ -16,9 +16,9 @@
unifor
numbworks_logo_128x128px.ico
numbworks_logo_128x128px.png
- 4.1.0
- 4.1.0.0
- 4.1.0.0
+ 4.2.0
+ 4.2.0.0
+ 4.2.0.0
@@ -32,5 +32,6 @@
+
\ No newline at end of file
diff --git a/tests/NW.UnivariateForecasting.UnitTests/Bags/ComponentBagTests.cs b/tests/NW.UnivariateForecasting.UnitTests/Bags/ComponentBagTests.cs
index 46bf0e3..ea25093 100644
--- a/tests/NW.UnivariateForecasting.UnitTests/Bags/ComponentBagTests.cs
+++ b/tests/NW.UnivariateForecasting.UnitTests/Bags/ComponentBagTests.cs
@@ -5,7 +5,7 @@
using NW.Shared.Files;
using NW.UnivariateForecasting.Forecasts;
using NW.UnivariateForecasting.Observations;
-using NW.UnivariateForecasting.Serializations;
+using NW.Shared.Serialization;
using NW.UnivariateForecasting.SlidingWindows;
using NUnit.Framework;
diff --git a/tests/NW.UnivariateForecasting.UnitTests/Forecasts/ObjectMother.cs b/tests/NW.UnivariateForecasting.UnitTests/Forecasts/ObjectMother.cs
index bc66a22..dd73634 100644
--- a/tests/NW.UnivariateForecasting.UnitTests/Forecasts/ObjectMother.cs
+++ b/tests/NW.UnivariateForecasting.UnitTests/Forecasts/ObjectMother.cs
@@ -57,7 +57,7 @@ public static ForecastingInit ForecastingInit_DoubleWithCE
steps: ForecastingInit_Steps_MultipleDouble
);
- public static string ForecastingSession_Version = "4.1.0.0";
+ public static string ForecastingSession_Version = "4.2.0.0";
public static double NextValue = 519.23;
public static List ExpandedValues = new List() { 58.5, 615.26, 659.84, 635.69, 612.27, 632.94, NextValue };
diff --git a/tests/NW.UnivariateForecasting.UnitTests/NW.UnivariateForecasting.UnitTests.csproj b/tests/NW.UnivariateForecasting.UnitTests/NW.UnivariateForecasting.UnitTests.csproj
index c8bf2e9..50e25ff 100644
--- a/tests/NW.UnivariateForecasting.UnitTests/NW.UnivariateForecasting.UnitTests.csproj
+++ b/tests/NW.UnivariateForecasting.UnitTests/NW.UnivariateForecasting.UnitTests.csproj
@@ -8,13 +8,14 @@
https://github.com/numbworks/NW.UnivariateForecasting
https://raw.githubusercontent.com/numbworks/numbworks/master/numbworks_logo_128x128px.png
machinelearning csharp library univariate timeseriesanalysis netstandard forecasting
- 4.1.0
+ 4.2.0
+
diff --git a/tests/NW.UnivariateForecasting.UnitTests/Resources/ForecastingSessionDoubleWithCEAsJson.txt b/tests/NW.UnivariateForecasting.UnitTests/Resources/ForecastingSessionDoubleWithCEAsJson.txt
index 727ff0c..1cf1a40 100644
--- a/tests/NW.UnivariateForecasting.UnitTests/Resources/ForecastingSessionDoubleWithCEAsJson.txt
+++ b/tests/NW.UnivariateForecasting.UnitTests/Resources/ForecastingSessionDoubleWithCEAsJson.txt
@@ -25,5 +25,5 @@
"NextValue": 158.25
}
],
- "Version": "4.1.0.0"
+ "Version": "4.2.0.0"
}
\ No newline at end of file
diff --git a/tests/NW.UnivariateForecasting.UnitTests/Resources/ForecastingSessionSingleWithCEAsJson.txt b/tests/NW.UnivariateForecasting.UnitTests/Resources/ForecastingSessionSingleWithCEAsJson.txt
index 056317f..040e8db 100644
--- a/tests/NW.UnivariateForecasting.UnitTests/Resources/ForecastingSessionSingleWithCEAsJson.txt
+++ b/tests/NW.UnivariateForecasting.UnitTests/Resources/ForecastingSessionSingleWithCEAsJson.txt
@@ -20,5 +20,5 @@
"NextValue": 316.48
}
],
- "Version": "4.1.0.0"
+ "Version": "4.2.0.0"
}
\ No newline at end of file
diff --git a/tests/NW.UnivariateForecasting.UnitTests/Resources/ForecastingSessionSingleWithoutCEAsJson.txt b/tests/NW.UnivariateForecasting.UnitTests/Resources/ForecastingSessionSingleWithoutCEAsJson.txt
index 09e63cb..db88de0 100644
--- a/tests/NW.UnivariateForecasting.UnitTests/Resources/ForecastingSessionSingleWithoutCEAsJson.txt
+++ b/tests/NW.UnivariateForecasting.UnitTests/Resources/ForecastingSessionSingleWithoutCEAsJson.txt
@@ -20,5 +20,5 @@
"NextValue": 519.23
}
],
- "Version": "4.1.0.0"
+ "Version": "4.2.0.0"
}
\ No newline at end of file
diff --git a/tests/NW.UnivariateForecasting.UnitTests/Serializations/SerializerFactoryTests.cs b/tests/NW.UnivariateForecasting.UnitTests/Serialization/SerializerFactoryTests.cs
similarity index 96%
rename from tests/NW.UnivariateForecasting.UnitTests/Serializations/SerializerFactoryTests.cs
rename to tests/NW.UnivariateForecasting.UnitTests/Serialization/SerializerFactoryTests.cs
index 2d9fe96..6e6297e 100644
--- a/tests/NW.UnivariateForecasting.UnitTests/Serializations/SerializerFactoryTests.cs
+++ b/tests/NW.UnivariateForecasting.UnitTests/Serialization/SerializerFactoryTests.cs
@@ -1,5 +1,5 @@
using NW.UnivariateForecasting.Forecasts;
-using NW.UnivariateForecasting.Serializations;
+using NW.Shared.Serialization;
using NUnit.Framework;
namespace NW.UnivariateForecasting.UnitTests.Serializations
diff --git a/tests/NW.UnivariateForecasting.UnitTests/Serializations/SerializerTests.cs b/tests/NW.UnivariateForecasting.UnitTests/Serialization/SerializerTests.cs
similarity index 99%
rename from tests/NW.UnivariateForecasting.UnitTests/Serializations/SerializerTests.cs
rename to tests/NW.UnivariateForecasting.UnitTests/Serialization/SerializerTests.cs
index 2bc6913..25d7f48 100644
--- a/tests/NW.UnivariateForecasting.UnitTests/Serializations/SerializerTests.cs
+++ b/tests/NW.UnivariateForecasting.UnitTests/Serialization/SerializerTests.cs
@@ -1,6 +1,6 @@
using System;
using NW.UnivariateForecasting.Forecasts;
-using NW.UnivariateForecasting.Serializations;
+using NW.Shared.Serialization;
using NUnit.Framework;
namespace NW.UnivariateForecasting.UnitTests.Serializations
diff --git a/tests/NW.UnivariateForecasting.UnitTests/UnivariateForecasterTests.cs b/tests/NW.UnivariateForecasting.UnitTests/UnivariateForecasterTests.cs
index 41fefe8..5a4e5f0 100644
--- a/tests/NW.UnivariateForecasting.UnitTests/UnivariateForecasterTests.cs
+++ b/tests/NW.UnivariateForecasting.UnitTests/UnivariateForecasterTests.cs
@@ -7,7 +7,7 @@
using NW.UnivariateForecasting.Filenames;
using NW.UnivariateForecasting.Forecasts;
using NW.UnivariateForecasting.Observations;
-using NW.UnivariateForecasting.Serializations;
+using NW.Shared.Serialization;
using NW.UnivariateForecasting.SlidingWindows;
using NW.UnivariateForecasting.UnitTests.Utilities;
using NW.Shared.Files;
diff --git a/tests/NW.UnivariateForecastingClient.UnitTests/NW.UnivariateForecastingClient.UnitTests.csproj b/tests/NW.UnivariateForecastingClient.UnitTests/NW.UnivariateForecastingClient.UnitTests.csproj
index acf0f6a..7b21e48 100644
--- a/tests/NW.UnivariateForecastingClient.UnitTests/NW.UnivariateForecastingClient.UnitTests.csproj
+++ b/tests/NW.UnivariateForecastingClient.UnitTests/NW.UnivariateForecastingClient.UnitTests.csproj
@@ -6,7 +6,7 @@
Library
numbworks 2024
- 4.1.0
+ 4.2.0
https://github.com/numbworks/NW.UnivariateForecasting
numbworks_logo_128x128px.png
@@ -19,6 +19,7 @@
+
diff --git a/tests/NW.UnivariateForecastingClient.UnitTests/Shared/LibraryBrokerTests.cs b/tests/NW.UnivariateForecastingClient.UnitTests/Shared/LibraryBrokerTests.cs
index e4d9c08..dd335c6 100644
--- a/tests/NW.UnivariateForecastingClient.UnitTests/Shared/LibraryBrokerTests.cs
+++ b/tests/NW.UnivariateForecastingClient.UnitTests/Shared/LibraryBrokerTests.cs
@@ -6,7 +6,7 @@
using NW.UnivariateForecasting.AsciiBanner;
using NW.UnivariateForecasting.Filenames;
using NW.UnivariateForecasting.Forecasts;
-using NW.UnivariateForecasting.Serializations;
+using NW.Shared.Serialization;
using NW.UnivariateForecastingClient.Shared;
using NW.UnivariateForecastingClient.UnitTests.Utilities;
using NUnit.Framework;