From 4f685c002b6cbc4ea1b6715efb3dfeb02de34e94 Mon Sep 17 00:00:00 2001 From: HugoBurgess Date: Mon, 13 Nov 2023 15:25:17 +0000 Subject: [PATCH 1/4] Abzu 101180 - use ProGetCloud --- BuildNuget.config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BuildNuget.config b/BuildNuget.config index e59131e9..d1693cb6 100644 --- a/BuildNuget.config +++ b/BuildNuget.config @@ -3,6 +3,7 @@ - + + From 83119b28d5937c6e20400a0083e98fa3db4454e8 Mon Sep 17 00:00:00 2001 From: HugoBurgess Date: Mon, 13 Nov 2023 16:53:14 +0000 Subject: [PATCH 2/4] Remove unused package --- .../EntityPropertyConvert.cs | 45 ------------------- .../UKHO.SAP.MockAPIService.csproj | 1 - 2 files changed, 46 deletions(-) delete mode 100644 src/UKHO.SAP.MockAPIService/EntityPropertyConverter/EntityPropertyConvert.cs diff --git a/src/UKHO.SAP.MockAPIService/EntityPropertyConverter/EntityPropertyConvert.cs b/src/UKHO.SAP.MockAPIService/EntityPropertyConverter/EntityPropertyConvert.cs deleted file mode 100644 index 5fd7019f..00000000 --- a/src/UKHO.SAP.MockAPIService/EntityPropertyConverter/EntityPropertyConvert.cs +++ /dev/null @@ -1,45 +0,0 @@ -using Microsoft.WindowsAzure.Storage.Table; -using Newtonsoft.Json; -using System.Diagnostics.CodeAnalysis; - -namespace UKHO.SAP.MockAPIService.EntityPropertyConverter -{ - [ExcludeFromCodeCoverage] - public static class EntityPropertyConvert - { - public static void Serialize(TEntity entity, IDictionary results) - { - foreach (var property in typeof(TEntity).GetProperties()) - { - var attributedProperty = (EntityPropertyConverterAttribute)Attribute.GetCustomAttribute(property, typeof(EntityPropertyConverterAttribute)); - if (attributedProperty != null) - { - var entityProperty = entity.GetType().GetProperty(property.Name)?.GetValue(entity); - results.Add(property.Name, new EntityProperty(JsonConvert.SerializeObject(entityProperty))); - } - } - } - - public static void DeSerialize(TEntity entity, IDictionary properties) - { - foreach (var property in typeof(TEntity).GetProperties()) - { - var attributedProperty = (EntityPropertyConverterAttribute)Attribute.GetCustomAttribute(property, typeof(EntityPropertyConverterAttribute)); - if (attributedProperty != null) - { - Type resultType = null; - if (attributedProperty.ConvertToType != null) - { - resultType = attributedProperty.ConvertToType; - } - else - { - resultType = property.GetType(); - } - var objectValue = JsonConvert.DeserializeObject(properties[property.Name].StringValue, resultType); - entity.GetType().GetProperty(property.Name)?.SetValue(entity, objectValue); - } - } - } - } -} diff --git a/src/UKHO.SAP.MockAPIService/UKHO.SAP.MockAPIService.csproj b/src/UKHO.SAP.MockAPIService/UKHO.SAP.MockAPIService.csproj index e00f1157..e54904a8 100644 --- a/src/UKHO.SAP.MockAPIService/UKHO.SAP.MockAPIService.csproj +++ b/src/UKHO.SAP.MockAPIService/UKHO.SAP.MockAPIService.csproj @@ -23,7 +23,6 @@ - From 8315cb738919950e3b7ef6b9f70fa539a28046f2 Mon Sep 17 00:00:00 2001 From: HugoBurgess Date: Mon, 13 Nov 2023 16:55:09 +0000 Subject: [PATCH 3/4] Remove another unused package --- .../EntityPropertyConvert.cs | 44 ------------------- .../UKHO.ERPFacade.API.FunctionalTests.csproj | 1 - 2 files changed, 45 deletions(-) delete mode 100644 tests/UKHO.ERPFacade.API.FunctionalTests/Model/EntityPropertyConverter/EntityPropertyConvert.cs diff --git a/tests/UKHO.ERPFacade.API.FunctionalTests/Model/EntityPropertyConverter/EntityPropertyConvert.cs b/tests/UKHO.ERPFacade.API.FunctionalTests/Model/EntityPropertyConverter/EntityPropertyConvert.cs deleted file mode 100644 index b742ae51..00000000 --- a/tests/UKHO.ERPFacade.API.FunctionalTests/Model/EntityPropertyConverter/EntityPropertyConvert.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Diagnostics.CodeAnalysis; -using Microsoft.WindowsAzure.Storage.Table; -using Newtonsoft.Json; -namespace UKHO.ERPFacade.API.FunctionalTests.Model.EntityPropertyConverter -{ - [ExcludeFromCodeCoverage] - public static class EntityPropertyConvert - { - public static void Serialize(TEntity entity, IDictionary results) - { - foreach (var property in typeof(TEntity).GetProperties()) - { - var attributedProperty = (EntityPropertyConverterAttribute)Attribute.GetCustomAttribute(property, typeof(EntityPropertyConverterAttribute)); - if (attributedProperty != null) - { - var entityProperty = entity.GetType().GetProperty(property.Name)?.GetValue(entity); - results.Add(property.Name, new EntityProperty(JsonConvert.SerializeObject(entityProperty))); - } - } - } - - public static void DeSerialize(TEntity entity, IDictionary properties) - { - foreach (var property in typeof(TEntity).GetProperties()) - { - var attributedProperty = (EntityPropertyConverterAttribute)Attribute.GetCustomAttribute(property, typeof(EntityPropertyConverterAttribute)); - if (attributedProperty != null) - { - Type resultType = null; - if (attributedProperty.ConvertToType != null) - { - resultType = attributedProperty.ConvertToType; - } - else - { - resultType = property.GetType(); - } - var objectValue = JsonConvert.DeserializeObject(properties[property.Name].StringValue, resultType); - entity.GetType().GetProperty(property.Name)?.SetValue(entity, objectValue); - } - } - } - } -} diff --git a/tests/UKHO.ERPFacade.API.FunctionalTests/UKHO.ERPFacade.API.FunctionalTests.csproj b/tests/UKHO.ERPFacade.API.FunctionalTests/UKHO.ERPFacade.API.FunctionalTests.csproj index f4a868eb..c0673f0e 100644 --- a/tests/UKHO.ERPFacade.API.FunctionalTests/UKHO.ERPFacade.API.FunctionalTests.csproj +++ b/tests/UKHO.ERPFacade.API.FunctionalTests/UKHO.ERPFacade.API.FunctionalTests.csproj @@ -34,7 +34,6 @@ - From 80b30e124e4b1017094d4d468db60a87484855dd Mon Sep 17 00:00:00 2001 From: HugoBurgess Date: Mon, 13 Nov 2023 17:03:21 +0000 Subject: [PATCH 4/4] Remove unused NVD suppression --- NVDSuppressions.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/NVDSuppressions.xml b/NVDSuppressions.xml index b4c90c51..3ffa36b9 100644 --- a/NVDSuppressions.xml +++ b/NVDSuppressions.xml @@ -192,18 +192,6 @@ - - CVE-2017-11770 - - - -