From 8744e8841b278e85314c48717fdb9d8266239fc3 Mon Sep 17 00:00:00 2001 From: Sergio Matias Urquin Date: Sat, 17 May 2025 18:45:14 -0600 Subject: [PATCH] remove old dependencies --- .../Helpers/ApiResponseHelper.cs | 2 +- .../Token/AuthenticatedHttpClientHandler.cs | 2 +- .../Helpers/Token/HttpContextTokenProvider.cs | 2 +- .../Helpers/Token/ITokenProvider.cs | 2 +- .../Presentation/Adapters/ErrorDetails.cs | 2 +- .../Presentation/Adapters/HttpError.cs | 2 +- .../Adapters/Mobile2.0/GPSPointAdapter.cs | 88 ------------------- .../Adapters/Mobile2.0/GeometryAdapter.cs | 15 ---- .../Adapters/Mobile2.0/MapsheetAdapter.cs | 87 ------------------ .../Adapters/Mobile2.0/SurveyAdapter.cs | 29 ------ 10 files changed, 6 insertions(+), 225 deletions(-) delete mode 100644 Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/GPSPointAdapter.cs delete mode 100644 Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/GeometryAdapter.cs delete mode 100644 Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/MapsheetAdapter.cs delete mode 100644 Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/SurveyAdapter.cs diff --git a/Lib.Architecture.BuildingBlocks/Helpers/ApiResponseHelper.cs b/Lib.Architecture.BuildingBlocks/Helpers/ApiResponseHelper.cs index adb8aa3..4eeee10 100644 --- a/Lib.Architecture.BuildingBlocks/Helpers/ApiResponseHelper.cs +++ b/Lib.Architecture.BuildingBlocks/Helpers/ApiResponseHelper.cs @@ -34,7 +34,7 @@ namespace Lib.Architecture.BuildingBlocks.Helpers } } - if (refitException.StatusCode == HttpStatusCode.InternalServerError) + if (refitException.StatusCode == HttpStatusCode.InternalServerError && errorMessage is string) port.InternalServerError(errorMessage); else if (refitException.StatusCode == HttpStatusCode.NotFound) diff --git a/Lib.Architecture.BuildingBlocks/Helpers/Token/AuthenticatedHttpClientHandler.cs b/Lib.Architecture.BuildingBlocks/Helpers/Token/AuthenticatedHttpClientHandler.cs index 67f4b24..5005f28 100644 --- a/Lib.Architecture.BuildingBlocks/Helpers/Token/AuthenticatedHttpClientHandler.cs +++ b/Lib.Architecture.BuildingBlocks/Helpers/Token/AuthenticatedHttpClientHandler.cs @@ -1,6 +1,6 @@ // *********************************************************************** // -// Heath +// AgileWebs // // *********************************************************************** diff --git a/Lib.Architecture.BuildingBlocks/Helpers/Token/HttpContextTokenProvider.cs b/Lib.Architecture.BuildingBlocks/Helpers/Token/HttpContextTokenProvider.cs index 5abb2a0..b20208d 100644 --- a/Lib.Architecture.BuildingBlocks/Helpers/Token/HttpContextTokenProvider.cs +++ b/Lib.Architecture.BuildingBlocks/Helpers/Token/HttpContextTokenProvider.cs @@ -1,6 +1,6 @@ // *********************************************************************** // -// Heath +// AgileWebs // // *********************************************************************** diff --git a/Lib.Architecture.BuildingBlocks/Helpers/Token/ITokenProvider.cs b/Lib.Architecture.BuildingBlocks/Helpers/Token/ITokenProvider.cs index 427ca6a..4d89f7e 100644 --- a/Lib.Architecture.BuildingBlocks/Helpers/Token/ITokenProvider.cs +++ b/Lib.Architecture.BuildingBlocks/Helpers/Token/ITokenProvider.cs @@ -1,6 +1,6 @@ // *********************************************************************** // -// Heath +// AgileWebs // // *********************************************************************** diff --git a/Lib.Architecture.BuildingBlocks/Presentation/Adapters/ErrorDetails.cs b/Lib.Architecture.BuildingBlocks/Presentation/Adapters/ErrorDetails.cs index d0c320f..fe0ae58 100644 --- a/Lib.Architecture.BuildingBlocks/Presentation/Adapters/ErrorDetails.cs +++ b/Lib.Architecture.BuildingBlocks/Presentation/Adapters/ErrorDetails.cs @@ -1,6 +1,6 @@ // *********************************************************************** // -// Heath +// AgileWebs // // *********************************************************************** diff --git a/Lib.Architecture.BuildingBlocks/Presentation/Adapters/HttpError.cs b/Lib.Architecture.BuildingBlocks/Presentation/Adapters/HttpError.cs index 19656f1..16cf01a 100644 --- a/Lib.Architecture.BuildingBlocks/Presentation/Adapters/HttpError.cs +++ b/Lib.Architecture.BuildingBlocks/Presentation/Adapters/HttpError.cs @@ -1,6 +1,6 @@ // *********************************************************************** // -// Heath +// AgileWebs // // *********************************************************************** diff --git a/Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/GPSPointAdapter.cs b/Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/GPSPointAdapter.cs deleted file mode 100644 index 6c378dc..0000000 --- a/Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/GPSPointAdapter.cs +++ /dev/null @@ -1,88 +0,0 @@ -using Core.Blueprint.Mongo; -using MongoDB.Bson; -using MongoDB.Bson.Serialization.Attributes; -using Newtonsoft.Json; - -namespace Lib.Architecture.BuildingBlocks.Adapters; - -[CollectionAttributeName("GPSPoints")] -public class GPSPointAdapter : Document -{ - [BsonElement("features")] - [JsonProperty("features")] - public List Features { get; set; } = null!; - - [BsonElement("timestamp")] - [JsonProperty("timestamp")] - public DateTime Timestamp { get; set; } -} -public class FeatureCollection -{ - [BsonElement("type")] - [JsonProperty("type")] - public string Type { get; set; } = null!; - - [BsonElement("geometry")] - [JsonProperty("geometry")] - public Geometry Geometry { get; set; } = null!; - - [BsonElement("properties")] - [JsonProperty("properties")] - public Properties Properties { get; set; } = null!; -} - -public class Properties -{ - [BsonElement("technicianId")] - [BsonRepresentation(BsonType.ObjectId)] - [JsonProperty("technicianId")] - public string TechnicianId { get; set; } = null!; - - [BsonElement("technicianName")] - [JsonProperty("technicianName")] - public string TechnicianName { get; set; } = null!; - - [BsonElement("sbuSurveyId")] - [BsonRepresentation(BsonType.ObjectId)] - [JsonProperty("sbuSurveyId")] - public string SbuSurveyId { get; set; } = null!; - - [BsonElement("sbuSurveyMapsheetId")] - [BsonRepresentation(BsonType.ObjectId)] - [JsonProperty("sbuSurveyMapsheetId")] - public string SbuSurveyMapsheetId { get; set; } = null!; - - [BsonElement("trailId")] - [JsonProperty("trailId")] - public string TrailId { get; set; } = null!; - - [BsonElement("deviceSerialNumber")] - [JsonProperty("deviceSerialNumber")] - public string DeviceSerialNumber { get; set; } = null!; -} -public class Geometry -{ - [BsonElement("type")] - [JsonProperty("type")] - public string Type { get; set; } = null!; - - [BsonElement("coordinates")] - [JsonProperty("coordinates")] - public List Coordinates { get; set; } = null!; - - [BsonElement("latitude")] - [JsonProperty("latitude")] - public double Latitude { get; set; } - - [BsonElement("longitude")] - [JsonProperty("longitude")] - public double Longitude { get; set; } - - [BsonElement("orientation")] - [JsonProperty("orientation")] - public double Orientation { get; set; } - - [BsonElement("accuracy")] - [JsonProperty("accuracy")] - public int Accuracy { get; set; } -} \ No newline at end of file diff --git a/Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/GeometryAdapter.cs b/Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/GeometryAdapter.cs deleted file mode 100644 index 2b96fd5..0000000 --- a/Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/GeometryAdapter.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MongoDB.Bson.Serialization.Attributes; -using Newtonsoft.Json; - -namespace Lib.Architecture.BuildingBlocks.Adapters; - -public class GeometryAdapter -{ - [BsonElement("type")] - [JsonProperty("type")] - public string Type { get; set; } = null!; - - [BsonElement("coordinates")] - [JsonProperty("coordinates")] - public List Coordinates { get; set; } = null!; -} \ No newline at end of file diff --git a/Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/MapsheetAdapter.cs b/Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/MapsheetAdapter.cs deleted file mode 100644 index f177396..0000000 --- a/Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/MapsheetAdapter.cs +++ /dev/null @@ -1,87 +0,0 @@ -using Core.Blueprint.Mongo; -using MongoDB.Bson; -using MongoDB.Bson.Serialization.Attributes; -using Newtonsoft.Json; -using System.Text.Json.Serialization; - -namespace Lib.Architecture.BuildingBlocks.Adapters; - -[CollectionAttributeName("Mapsheets")] -public class MapsheetAdapter : Document -{ - [BsonElement("features")] - [JsonProperty("features")] - public List? Features { get; set; } - - [BsonElement("timestamp")] - [JsonProperty("timestamp")] - public DateTime Timestamp { get; set; } -} - -public class MapsheetTechnicians -{ - [BsonElement("technicianId")] - [BsonRepresentation(BsonType.ObjectId)] - [JsonProperty("technicianId")] - public string TechnicianId { get; set; } = null!; - - [BsonElement("technicianName")] - [JsonProperty("technicianName")] - public string TechnicianName { get; set; } = null!; -} - -public class MapsheetProperties -{ - [BsonElement("surveyId")] - [BsonRepresentation(BsonType.ObjectId)] - [JsonProperty("surveyId")] - public string SurveyId { get; set; } - - [BsonElement("mapsheetName")] - [JsonProperty("mapsheetName")] - public string MapsheetName { get; set; } = null!; - - [BsonElement("workOrderNumber")] - [JsonProperty("workOrderNumber")] - public string WorkOrderNumber { get; set; } = null!; - - [BsonElement("mapsheetStatus")] - [BsonRepresentation(BsonType.String)] - [JsonProperty("mapsheetStatus")] - [System.Text.Json.Serialization.JsonConverter(typeof(JsonStringEnumConverter))] - public MapsheetStatus MapsheetStatus { get; set; } - - [BsonElement("footage")] - [JsonProperty("footage")] - public int Footage { get; set; } -} - -[System.Text.Json.Serialization.JsonConverter(typeof(JsonStringEnumConverter))] -public enum MapsheetStatus -{ - Ready = 1, - InProgress = 2, - Complete = 3, - QaPending = 4, - Closed = 5, - Reopened = 6 -} - -public class MapsheetCollection -{ - [BsonElement("type")] - [JsonProperty("type")] - public string Type { get; set; } = null!; - - [BsonElement("mapsheetTechnicians")] - [JsonProperty("mapsheetTechnicians")] - public List? MapsheetTechnicians { get; set; } - - [BsonElement("geometry")] - [JsonProperty("geometry")] - public List Geometry { get; set; } = null!; - - [BsonElement("properties")] - [JsonProperty("properties")] - public MapsheetProperties? Properties { get; set; } -} \ No newline at end of file diff --git a/Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/SurveyAdapter.cs b/Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/SurveyAdapter.cs deleted file mode 100644 index 4fd251d..0000000 --- a/Lib.Architecture.BuildingBlocks/Presentation/Adapters/Mobile2.0/SurveyAdapter.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Core.Blueprint.Mongo; -using MongoDB.Bson.Serialization.Attributes; -using System.Text.Json.Serialization; - -namespace Lib.Architecture.BuildingBlocks.Adapters; - -[CollectionAttributeName("Surveys")] -public class SurveyAdapter : Document -{ - [BsonElement("surveyName")] - [JsonPropertyName("surveyName")] - public string SurveyName { get; set; } = null!; - - [BsonElement("surveyType")] - [JsonPropertyName("surveyType")] - public string SurveyType { get; set; } = null!; - - [BsonElement("locations")] - [JsonPropertyName("locations")] - public List Locations { get; set; } = []; - - [BsonElement("project")] - [JsonPropertyName("project")] - public string Project { get; set; } = null!; - - [BsonElement("surveyStatus")] - [JsonPropertyName("surveyStatus")] - public string SurveyStatus { get; set; } = null!; -}