diff --git a/Source/EasyNetQ.ApprovalTests/EasyNetQ.ApprovalTests.csproj b/Source/EasyNetQ.ApprovalTests/EasyNetQ.ApprovalTests.csproj index 9cc5748de..75d8a8a5b 100644 --- a/Source/EasyNetQ.ApprovalTests/EasyNetQ.ApprovalTests.csproj +++ b/Source/EasyNetQ.ApprovalTests/EasyNetQ.ApprovalTests.csproj @@ -1,6 +1,6 @@ - net8 + net8.0 EasyNetQ.Approval.Tests enable diff --git a/Source/EasyNetQ.ApprovalTests/EasyNetQ.approved.txt b/Source/EasyNetQ.ApprovalTests/EasyNetQ.approved.txt index 4c1803fb1..f7882860e 100644 --- a/Source/EasyNetQ.ApprovalTests/EasyNetQ.approved.txt +++ b/Source/EasyNetQ.ApprovalTests/EasyNetQ.approved.txt @@ -304,21 +304,17 @@ namespace EasyNetQ public static EasyNetQ.Consumer.ConsumePipelineBuilder UseScope(this EasyNetQ.Consumer.ConsumePipelineBuilder pipelineBuilder) { } public static EasyNetQ.IEasyNetQBuilder UseVersionedMessage(this EasyNetQ.IEasyNetQBuilder builder) { } } - [System.Serializable] public class EasyNetQException : System.Exception { public EasyNetQException() { } public EasyNetQException(string? message) { } - protected EasyNetQException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EasyNetQException(string format, params object?[] args) { } public EasyNetQException(string? message, System.Exception? inner) { } } - [System.Serializable] public class EasyNetQResponderException : EasyNetQ.EasyNetQException { public EasyNetQResponderException() { } public EasyNetQResponderException(string? message) { } - protected EasyNetQResponderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public EasyNetQResponderException(string format, params object?[] args) { } public EasyNetQResponderException(string? message, System.Exception? inner) { } } @@ -1773,28 +1769,22 @@ namespace EasyNetQ.Producer public EasyNetQ.Producer.IPublishPendingConfirmation CreatePendingConfirmation(RabbitMQ.Client.IModel model) { } public void Dispose() { } } - [System.Serializable] public class PublishInterruptedException : System.Exception { public PublishInterruptedException() { } public PublishInterruptedException(string? message) { } - protected PublishInterruptedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public PublishInterruptedException(string? message, System.Exception? inner) { } } - [System.Serializable] public class PublishNackedException : System.Exception { public PublishNackedException() { } public PublishNackedException(string? message) { } - protected PublishNackedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public PublishNackedException(string? message, System.Exception? inner) { } } - [System.Serializable] public class PublishReturnedException : System.Exception { public PublishReturnedException() { } public PublishReturnedException(string? message) { } - protected PublishReturnedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public PublishReturnedException(string? message, System.Exception? inner) { } } } diff --git a/Source/EasyNetQ.Examples.DlxRetry/EasyNetQ.Examples.DlxRetry.csproj b/Source/EasyNetQ.Examples.DlxRetry/EasyNetQ.Examples.DlxRetry.csproj index 8753d8ba4..c695ef7b8 100644 --- a/Source/EasyNetQ.Examples.DlxRetry/EasyNetQ.Examples.DlxRetry.csproj +++ b/Source/EasyNetQ.Examples.DlxRetry/EasyNetQ.Examples.DlxRetry.csproj @@ -2,7 +2,7 @@ Exe - net8 + net8.0 enable false enable diff --git a/Source/EasyNetQ.Examples.PubSubWithAdvancedApi/EasyNetQ.Examples.PubSubWithAdvancedApi.csproj b/Source/EasyNetQ.Examples.PubSubWithAdvancedApi/EasyNetQ.Examples.PubSubWithAdvancedApi.csproj index 32b4c47d7..362e6e052 100644 --- a/Source/EasyNetQ.Examples.PubSubWithAdvancedApi/EasyNetQ.Examples.PubSubWithAdvancedApi.csproj +++ b/Source/EasyNetQ.Examples.PubSubWithAdvancedApi/EasyNetQ.Examples.PubSubWithAdvancedApi.csproj @@ -2,7 +2,7 @@ Exe - net8 + net8.0 enable false enable diff --git a/Source/EasyNetQ.Examples.Rpc/EasyNetQ.Examples.Rpc.csproj b/Source/EasyNetQ.Examples.Rpc/EasyNetQ.Examples.Rpc.csproj index 480ee4b89..b0b416b24 100644 --- a/Source/EasyNetQ.Examples.Rpc/EasyNetQ.Examples.Rpc.csproj +++ b/Source/EasyNetQ.Examples.Rpc/EasyNetQ.Examples.Rpc.csproj @@ -2,7 +2,7 @@ Exe - net8 + net8.0 enable false enable diff --git a/Source/EasyNetQ.Hosepipe.Tests/EasyNetQ.Hosepipe.Tests.csproj b/Source/EasyNetQ.Hosepipe.Tests/EasyNetQ.Hosepipe.Tests.csproj index ca77cf24b..3f3a54d01 100644 --- a/Source/EasyNetQ.Hosepipe.Tests/EasyNetQ.Hosepipe.Tests.csproj +++ b/Source/EasyNetQ.Hosepipe.Tests/EasyNetQ.Hosepipe.Tests.csproj @@ -1,6 +1,6 @@ - + - net8 + net8.0 enable diff --git a/Source/EasyNetQ.Hosepipe/EasyNetQ.Hosepipe.csproj b/Source/EasyNetQ.Hosepipe/EasyNetQ.Hosepipe.csproj index eb3ef8e0a..f4821d3c8 100644 --- a/Source/EasyNetQ.Hosepipe/EasyNetQ.Hosepipe.csproj +++ b/Source/EasyNetQ.Hosepipe/EasyNetQ.Hosepipe.csproj @@ -1,7 +1,7 @@  EasyNetQ.Hosepipe - net8 + net8.0 Exe false enable diff --git a/Source/EasyNetQ.IntegrationTests/EasyNetQ.IntegrationTests.csproj b/Source/EasyNetQ.IntegrationTests/EasyNetQ.IntegrationTests.csproj index 4d704e186..77cca6483 100644 --- a/Source/EasyNetQ.IntegrationTests/EasyNetQ.IntegrationTests.csproj +++ b/Source/EasyNetQ.IntegrationTests/EasyNetQ.IntegrationTests.csproj @@ -1,6 +1,6 @@ - + - net8 + net8.0 enable diff --git a/Source/EasyNetQ.IntegrationTests/Rpc/Messages.cs b/Source/EasyNetQ.IntegrationTests/Rpc/Messages.cs index cf397c02a..133036304 100644 --- a/Source/EasyNetQ.IntegrationTests/Rpc/Messages.cs +++ b/Source/EasyNetQ.IntegrationTests/Rpc/Messages.cs @@ -85,7 +85,7 @@ public RabbitResponse(int id) : base(id) } } -[Serializable] + public class RequestFailedException : Exception { public RequestFailedException() diff --git a/Source/EasyNetQ.Serialization.NewtonsoftJson/EasyNetQ.Serialization.NewtonsoftJson.csproj b/Source/EasyNetQ.Serialization.NewtonsoftJson/EasyNetQ.Serialization.NewtonsoftJson.csproj index 06bff3640..8619d2701 100644 --- a/Source/EasyNetQ.Serialization.NewtonsoftJson/EasyNetQ.Serialization.NewtonsoftJson.csproj +++ b/Source/EasyNetQ.Serialization.NewtonsoftJson/EasyNetQ.Serialization.NewtonsoftJson.csproj @@ -1,8 +1,8 @@ - + An adaptor to allow EasyNetQ to use Newtonsoft.Json serializer - netstandard2.0;net6.0 + netstandard2.0;net8.0 Newtonsoft;$(PackageTags) enable enable diff --git a/Source/EasyNetQ.Serialization.SystemTextJson/EasyNetQ.Serialization.SystemTextJson.csproj b/Source/EasyNetQ.Serialization.SystemTextJson/EasyNetQ.Serialization.SystemTextJson.csproj index e14d9e686..9ff08e0ca 100644 --- a/Source/EasyNetQ.Serialization.SystemTextJson/EasyNetQ.Serialization.SystemTextJson.csproj +++ b/Source/EasyNetQ.Serialization.SystemTextJson/EasyNetQ.Serialization.SystemTextJson.csproj @@ -1,7 +1,7 @@ An adaptor to allow EasyNetQ to use System.Text.Json serializer - netstandard2.0;net6.0 + netstandard2.0;net8.0 enable enable diff --git a/Source/EasyNetQ.Serialization.Tests/EasyNetQ.Serialization.Tests.csproj b/Source/EasyNetQ.Serialization.Tests/EasyNetQ.Serialization.Tests.csproj index 1056a0e02..dfd306eda 100644 --- a/Source/EasyNetQ.Serialization.Tests/EasyNetQ.Serialization.Tests.csproj +++ b/Source/EasyNetQ.Serialization.Tests/EasyNetQ.Serialization.Tests.csproj @@ -1,6 +1,6 @@ - net8 + net8.0 enable diff --git a/Source/EasyNetQ.Tests/EasyNetQ.Tests.csproj b/Source/EasyNetQ.Tests/EasyNetQ.Tests.csproj index cf79123e5..20595761b 100644 --- a/Source/EasyNetQ.Tests/EasyNetQ.Tests.csproj +++ b/Source/EasyNetQ.Tests/EasyNetQ.Tests.csproj @@ -1,6 +1,6 @@ - + - net8 + net8.0 enable diff --git a/Source/EasyNetQ.Tests/SerializationTests.cs b/Source/EasyNetQ.Tests/SerializationTests.cs deleted file mode 100644 index b73ba59fc..000000000 --- a/Source/EasyNetQ.Tests/SerializationTests.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace EasyNetQ.Tests; - -public class SerializationTests -{ - [Fact] - public void Should_Deserialize_Exceptions() - { - var str1 = Newtonsoft.Json.JsonConvert.SerializeObject(new EasyNetQException("blablabla")); - var ex1 = Newtonsoft.Json.JsonConvert.DeserializeObject(str1); - ex1.Message.Should().Be("blablabla"); - - var str2 = Newtonsoft.Json.JsonConvert.SerializeObject(new EasyNetQResponderException("Ooops")); - var ex2 = Newtonsoft.Json.JsonConvert.DeserializeObject(str2); - ex2.Message.Should().Be("Ooops"); - } -} diff --git a/Source/EasyNetQ/EasyNetQ.csproj b/Source/EasyNetQ/EasyNetQ.csproj index 2219448ec..37a5c0438 100644 --- a/Source/EasyNetQ/EasyNetQ.csproj +++ b/Source/EasyNetQ/EasyNetQ.csproj @@ -1,7 +1,7 @@ A nice .NET API for RabbitMQ - netstandard2.0;net6.0 + netstandard2.0;net8.0 enable enable diff --git a/Source/EasyNetQ/EasyNetQException.cs b/Source/EasyNetQ/EasyNetQException.cs index 121c348a3..d925a0c06 100644 --- a/Source/EasyNetQ/EasyNetQException.cs +++ b/Source/EasyNetQ/EasyNetQException.cs @@ -2,7 +2,7 @@ namespace EasyNetQ; -[Serializable] + public class EasyNetQException : Exception { /// @@ -16,12 +16,9 @@ public EasyNetQException(string format, params object?[] args) : base(string.For /// public EasyNetQException(string? message, Exception? inner) : base(message, inner) { } - - /// - protected EasyNetQException(SerializationInfo info, StreamingContext context) : base(info, context) { } } -[Serializable] + public class EasyNetQResponderException : EasyNetQException { /// @@ -35,7 +32,4 @@ public EasyNetQResponderException(string format, params object?[] args) : base(f /// public EasyNetQResponderException(string? message, Exception? inner) : base(message, inner) { } - - /// - protected EasyNetQResponderException(SerializationInfo info, StreamingContext context) : base(info, context) { } } diff --git a/Source/EasyNetQ/Producer/PublishInterruptedException.cs b/Source/EasyNetQ/Producer/PublishInterruptedException.cs index 547d301d9..0a01c2504 100644 --- a/Source/EasyNetQ/Producer/PublishInterruptedException.cs +++ b/Source/EasyNetQ/Producer/PublishInterruptedException.cs @@ -5,7 +5,7 @@ namespace EasyNetQ.Producer; /// /// This exception indicates that a publish was interrupted(for instance, because of a reconnection) /// -[Serializable] + public class PublishInterruptedException : Exception { // @@ -29,9 +29,4 @@ public PublishInterruptedException(string? message) : base(message) public PublishInterruptedException(string? message, Exception? inner) : base(message, inner) { } - - /// - protected PublishInterruptedException(SerializationInfo info, StreamingContext context) : base(info, context) - { - } } diff --git a/Source/EasyNetQ/Producer/PublishNackedException.cs b/Source/EasyNetQ/Producer/PublishNackedException.cs index 6aa4337a5..b39fc45a8 100644 --- a/Source/EasyNetQ/Producer/PublishNackedException.cs +++ b/Source/EasyNetQ/Producer/PublishNackedException.cs @@ -5,7 +5,7 @@ namespace EasyNetQ.Producer; /// /// This exception indicates that a message was nacked /// -[Serializable] + public class PublishNackedException : Exception { // @@ -29,9 +29,4 @@ public PublishNackedException(string? message) : base(message) public PublishNackedException(string? message, Exception? inner) : base(message, inner) { } - - /// - protected PublishNackedException(SerializationInfo info, StreamingContext context) : base(info, context) - { - } } diff --git a/Source/EasyNetQ/Producer/PublishReturnedException.cs b/Source/EasyNetQ/Producer/PublishReturnedException.cs index 12c234f0e..bf06cf4a7 100644 --- a/Source/EasyNetQ/Producer/PublishReturnedException.cs +++ b/Source/EasyNetQ/Producer/PublishReturnedException.cs @@ -5,7 +5,7 @@ namespace EasyNetQ.Producer; /// /// This exception indicates that a message was returned /// -[Serializable] + public class PublishReturnedException : Exception { // @@ -29,9 +29,4 @@ public PublishReturnedException(string? message) : base(message) public PublishReturnedException(string? message, Exception? inner) : base(message, inner) { } - - /// - protected PublishReturnedException(SerializationInfo info, StreamingContext context) : base(info, context) - { - } }