From c313e0d5a86901a474023add57edfbb826face2d Mon Sep 17 00:00:00 2001 From: Matthew Jackson Date: Thu, 25 Jan 2024 15:23:07 -0600 Subject: [PATCH 1/3] Update EdFi.Ods.Common to .NET 8 --- Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj b/Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj index 67b5780e5f..8f52d05976 100644 --- a/Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj +++ b/Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj @@ -2,7 +2,7 @@ EdFi.Suite3.Ods.Common LICENSE.txt - net6.0 + net8.0 Debug;Release true true @@ -34,15 +34,13 @@ - - - - - + + + @@ -57,4 +55,4 @@ - + \ No newline at end of file From 04f9ef9674a46ba4cc25c4bf5f4ca06d8cf3ab89 Mon Sep 17 00:00:00 2001 From: Matthew Jackson Date: Thu, 25 Jan 2024 15:27:54 -0600 Subject: [PATCH 2/3] Update FluentValidation to 11.9.0 --- Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj b/Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj index 8f52d05976..0ec5b55f84 100644 --- a/Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj +++ b/Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj @@ -30,7 +30,7 @@ - + From 8d51116d0c644ce53f030ee08f1431b65441d4cc Mon Sep 17 00:00:00 2001 From: Matthew Jackson Date: Thu, 25 Jan 2024 15:51:22 -0600 Subject: [PATCH 3/3] Address serialization infrastructure marked obsolete in .NET 8 --- .../ApiSecurityConfigurationException.cs | 8 -------- .../Exceptions/BadRequestException.cs | 4 ---- .../Exceptions/DatabaseConnectionException.cs | 7 ------- .../Exceptions/DistributedCacheException.cs | 16 ++++++++-------- .../Exceptions/NotFoundException.cs | 7 ------- .../Exceptions/NotModifiedException.cs | 7 ------- .../ProfileContentTypeUsageException.cs | 10 +++++++--- .../Resource/ProfileContentTypeException.cs | 7 ------- .../Claims/AuthorizationContextException.cs | 7 ------- .../Security/EdFiSecurityConflictException.cs | 7 ------- .../Security/EdFiSecurityException.cs | 7 ------- 11 files changed, 15 insertions(+), 72 deletions(-) diff --git a/Application/EdFi.Ods.Common/Exceptions/ApiSecurityConfigurationException.cs b/Application/EdFi.Ods.Common/Exceptions/ApiSecurityConfigurationException.cs index 17261f07d4..81f7e3c73f 100644 --- a/Application/EdFi.Ods.Common/Exceptions/ApiSecurityConfigurationException.cs +++ b/Application/EdFi.Ods.Common/Exceptions/ApiSecurityConfigurationException.cs @@ -4,14 +4,12 @@ // See the LICENSE and NOTICES files in the project root for more information. using System; -using System.Runtime.Serialization; namespace EdFi.Ods.Common.Exceptions { /// /// Thrown when a problem is detected in the API security configuration that prevents API requests from safely being served. /// - [Serializable] public class ApiSecurityConfigurationException : Exception { // For guidelines regarding the creation of new exception types, see @@ -28,11 +26,5 @@ public ApiSecurityConfigurationException(string message) : base(message) public ApiSecurityConfigurationException(string message, Exception inner) : base(message, inner) { } - - protected ApiSecurityConfigurationException( - SerializationInfo info, - StreamingContext context) : base(info, context) - { - } } } diff --git a/Application/EdFi.Ods.Common/Exceptions/BadRequestException.cs b/Application/EdFi.Ods.Common/Exceptions/BadRequestException.cs index 9c1badaa76..783da86686 100644 --- a/Application/EdFi.Ods.Common/Exceptions/BadRequestException.cs +++ b/Application/EdFi.Ods.Common/Exceptions/BadRequestException.cs @@ -4,7 +4,6 @@ // See the LICENSE and NOTICES files in the project root for more information. using System; -using System.Runtime.Serialization; namespace EdFi.Ods.Common.Exceptions { @@ -17,8 +16,5 @@ public BadRequestException(string message) public BadRequestException(string message, Exception innerException) : base(message, innerException) { } - - protected BadRequestException(SerializationInfo info, StreamingContext context) - : base(info, context) { } } } diff --git a/Application/EdFi.Ods.Common/Exceptions/DatabaseConnectionException.cs b/Application/EdFi.Ods.Common/Exceptions/DatabaseConnectionException.cs index 910dd81535..6e37a65fad 100644 --- a/Application/EdFi.Ods.Common/Exceptions/DatabaseConnectionException.cs +++ b/Application/EdFi.Ods.Common/Exceptions/DatabaseConnectionException.cs @@ -4,11 +4,9 @@ // See the LICENSE and NOTICES files in the project root for more information. using System; -using System.Runtime.Serialization; namespace EdFi.Ods.Common.Exceptions { - [Serializable] public class DatabaseConnectionException : Exception { @@ -19,10 +17,5 @@ public DatabaseConnectionException(string message) public DatabaseConnectionException(string message, Exception inner) : base(message, inner) { } - - protected DatabaseConnectionException( - SerializationInfo info, - StreamingContext context) - : base(info, context) { } } } diff --git a/Application/EdFi.Ods.Common/Exceptions/DistributedCacheException.cs b/Application/EdFi.Ods.Common/Exceptions/DistributedCacheException.cs index 78b91d136e..aa7b2aeed9 100644 --- a/Application/EdFi.Ods.Common/Exceptions/DistributedCacheException.cs +++ b/Application/EdFi.Ods.Common/Exceptions/DistributedCacheException.cs @@ -4,11 +4,9 @@ // See the LICENSE and NOTICES files in the project root for more information. using System; -using System.Runtime.Serialization; namespace EdFi.Ods.Common.Exceptions { - [Serializable] public class DistributedCacheException : Exception { // For guidelines regarding the creation of new exception types, see @@ -21,19 +19,21 @@ public DistributedCacheException(string message) public DistributedCacheException(string message, Exception inner) : base(message, inner) { } - - protected DistributedCacheException( - SerializationInfo info, - StreamingContext context) - : base(info, context) { } } - [Serializable] public class SafeDistributedCacheException : DistributedCacheException { public override string StackTrace => "See log for details"; public SafeDistributedCacheException(string message) : base(message) { } + + public SafeDistributedCacheException() : base() + { + } + + public SafeDistributedCacheException(string message, Exception inner) : base(message, inner) + { + } } } \ No newline at end of file diff --git a/Application/EdFi.Ods.Common/Exceptions/NotFoundException.cs b/Application/EdFi.Ods.Common/Exceptions/NotFoundException.cs index 18c1d406f4..8ae05f3eb9 100644 --- a/Application/EdFi.Ods.Common/Exceptions/NotFoundException.cs +++ b/Application/EdFi.Ods.Common/Exceptions/NotFoundException.cs @@ -4,14 +4,12 @@ // See the LICENSE and NOTICES files in the project root for more information. using System; -using System.Runtime.Serialization; namespace EdFi.Ods.Common.Exceptions { /// /// Indicates that a resource or persistent model identified for an operation was not found. /// - [Serializable] public class NotFoundException : Exception { // For guidelines regarding the creation of new exception types, see @@ -32,11 +30,6 @@ public NotFoundException(string message, string typeName, string identifier) public NotFoundException(string message, Exception inner) : base(message, inner) { } - protected NotFoundException( - SerializationInfo info, - StreamingContext context) - : base(info, context) { } - public string TypeName { get; set; } public string Identifier { get; set; } diff --git a/Application/EdFi.Ods.Common/Exceptions/NotModifiedException.cs b/Application/EdFi.Ods.Common/Exceptions/NotModifiedException.cs index eb4aeb19bb..7c8c224a89 100644 --- a/Application/EdFi.Ods.Common/Exceptions/NotModifiedException.cs +++ b/Application/EdFi.Ods.Common/Exceptions/NotModifiedException.cs @@ -4,11 +4,9 @@ // See the LICENSE and NOTICES files in the project root for more information. using System; -using System.Runtime.Serialization; namespace EdFi.Ods.Common.Exceptions { - [Serializable] public class NotModifiedException : Exception { // For guidelines regarding the creation of new exception types, see @@ -21,10 +19,5 @@ public NotModifiedException(string message) public NotModifiedException(string message, Exception inner) : base(message, inner) { } - - protected NotModifiedException( - SerializationInfo info, - StreamingContext context) - : base(info, context) { } } } diff --git a/Application/EdFi.Ods.Common/Exceptions/ProfileContentTypeUsageException.cs b/Application/EdFi.Ods.Common/Exceptions/ProfileContentTypeUsageException.cs index 072c19b362..f06821916c 100644 --- a/Application/EdFi.Ods.Common/Exceptions/ProfileContentTypeUsageException.cs +++ b/Application/EdFi.Ods.Common/Exceptions/ProfileContentTypeUsageException.cs @@ -4,7 +4,6 @@ // See the LICENSE and NOTICES files in the project root for more information. using System; -using System.Runtime.Serialization; using EdFi.Ods.Common.Utils.Profiles; namespace EdFi.Ods.Common.Exceptions; @@ -27,8 +26,13 @@ public ProfileContentTypeUsageException(string message, string profileName, Cont ContentTypeUsage = contentTypeUsage; } - protected ProfileContentTypeUsageException(SerializationInfo info, StreamingContext context) - : base(info, context) { } + public ProfileContentTypeUsageException(string message) : base(message) + { + } + + public ProfileContentTypeUsageException(string message, Exception innerException) : base(message, innerException) + { + } public string ProfileName { get; } diff --git a/Application/EdFi.Ods.Common/Models/Resource/ProfileContentTypeException.cs b/Application/EdFi.Ods.Common/Models/Resource/ProfileContentTypeException.cs index 1e4be8b604..34ac19ac70 100644 --- a/Application/EdFi.Ods.Common/Models/Resource/ProfileContentTypeException.cs +++ b/Application/EdFi.Ods.Common/Models/Resource/ProfileContentTypeException.cs @@ -4,11 +4,9 @@ // See the LICENSE and NOTICES files in the project root for more information. using System; -using System.Runtime.Serialization; namespace EdFi.Ods.Common.Models.Resource { - [Serializable] public class ProfileContentTypeException : Exception { public ProfileContentTypeException() { } @@ -18,10 +16,5 @@ public ProfileContentTypeException(string message) public ProfileContentTypeException(string message, Exception inner) : base(message, inner) { } - - protected ProfileContentTypeException( - SerializationInfo info, - StreamingContext context) - : base(info, context) { } } } diff --git a/Application/EdFi.Ods.Common/Security/Claims/AuthorizationContextException.cs b/Application/EdFi.Ods.Common/Security/Claims/AuthorizationContextException.cs index e329f04200..fd1e7cb2c7 100644 --- a/Application/EdFi.Ods.Common/Security/Claims/AuthorizationContextException.cs +++ b/Application/EdFi.Ods.Common/Security/Claims/AuthorizationContextException.cs @@ -4,11 +4,9 @@ // See the LICENSE and NOTICES files in the project root for more information. using System; -using System.Runtime.Serialization; namespace EdFi.Ods.Common.Security.Claims { - [Serializable] public class AuthorizationContextException : Exception { // @@ -25,10 +23,5 @@ public AuthorizationContextException(string message) public AuthorizationContextException(string message, Exception inner) : base(message, inner) { } - - protected AuthorizationContextException( - SerializationInfo info, - StreamingContext context) - : base(info, context) { } } } diff --git a/Application/EdFi.Ods.Common/Security/EdFiSecurityConflictException.cs b/Application/EdFi.Ods.Common/Security/EdFiSecurityConflictException.cs index 199eddcd3a..1e74ba0616 100644 --- a/Application/EdFi.Ods.Common/Security/EdFiSecurityConflictException.cs +++ b/Application/EdFi.Ods.Common/Security/EdFiSecurityConflictException.cs @@ -4,11 +4,9 @@ // See the LICENSE and NOTICES files in the project root for more information. using System; -using System.Runtime.Serialization; namespace EdFi.Ods.Common.Security { - [Serializable] public class EdFiSecurityConflictException : Exception { public EdFiSecurityConflictException() { } @@ -42,11 +40,6 @@ public EdFiSecurityConflictException(string message, string resource, string act public EdFiSecurityConflictException(string message, Exception inner) : base(message, inner) { } - protected EdFiSecurityConflictException( - SerializationInfo info, - StreamingContext context) - : base(info, context) { } - public string ApiKey { get; } public string Resource { get; } diff --git a/Application/EdFi.Ods.Common/Security/EdFiSecurityException.cs b/Application/EdFi.Ods.Common/Security/EdFiSecurityException.cs index 72b7dcce39..bb57a9b4e2 100644 --- a/Application/EdFi.Ods.Common/Security/EdFiSecurityException.cs +++ b/Application/EdFi.Ods.Common/Security/EdFiSecurityException.cs @@ -4,11 +4,9 @@ // See the LICENSE and NOTICES files in the project root for more information. using System; -using System.Runtime.Serialization; namespace EdFi.Ods.Common.Security { - [Serializable] public class EdFiSecurityException : Exception { public EdFiSecurityException() { } @@ -42,11 +40,6 @@ public EdFiSecurityException(string message, string resource, string action, str public EdFiSecurityException(string message, Exception inner) : base(message, inner) { } - protected EdFiSecurityException( - SerializationInfo info, - StreamingContext context) - : base(info, context) { } - public string ApiKey { get; } public string Resource { get; }