Skip to content

Commit

Permalink
Merge pull request #587 from zidad/remove-serializable
Browse files Browse the repository at this point in the history
Removed Serializable attribute from messages and exceptions
  • Loading branch information
micdenny committed Jul 25, 2016
2 parents afc886b + a5487b4 commit 8c086e8
Show file tree
Hide file tree
Showing 27 changed files with 16 additions and 91 deletions.
4 changes: 2 additions & 2 deletions Package/EasyNetQ.DI.Autofac/EasyNetQ.DI.Autofac.nuspec
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>EasyNetQ.DI.Autofac</id>
<!-- Version gets updated from EasyNetQ.dll version number during the build's packaging process -->
<version>0.53.4.0</version>
<version>0.60.0.0</version>
<title>EasyNetQ.DI.Autofac</title>
<authors>Wiebe Tijsma, Mike Hadlow</authors>
<owners>Mike Hadlow</owners>
Expand All @@ -17,7 +17,7 @@
<copyright>Copyright Mike Hadlow 2015</copyright>
<tags>RabbitMQ Messaging AMQP REST API Autofac</tags>
<dependencies>
<dependency id="EasyNetQ" version="0.53.4.0" />
<dependency id="EasyNetQ" version="0.60.0.0" />
<dependency id="Autofac" version="3.3.0.0" />
</dependencies>
</metadata>
Expand Down
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>EasyNetQ.DI.LightInject</id>
<!-- Version gets updated from EasyNetQ.dll version number during the build's packaging process -->
<version>0.53.6.0</version>
<version>0.60.0.0</version>
<title>EasyNetQ.DI.LightInject</title>
<authors>Jeff Doolittle, Mike Hadlow</authors>
<owners>Mike Hadlow</owners>
Expand All @@ -17,7 +17,7 @@
<copyright>Copyright Mike Hadlow 2016</copyright>
<tags>RabbitMQ Messaging AMQP REST API LightInject</tags>
<dependencies>
<dependency id="EasyNetQ" version="0.53.6.0" />
<dependency id="EasyNetQ" version="0.60.0.0" />
<dependency id="LightInject" version="3.0.2.7" />
</dependencies>
</metadata>
Expand Down
4 changes: 2 additions & 2 deletions Package/EasyNetQ.DI.Ninject/EasyNetQ.DI.Ninject.nuspec
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>EasyNetQ.DI.Ninject</id>
<!-- Version gets updated from EasyNetQ.dll version number during the build's packaging process -->
<version>0.53.4.0</version>
<version>0.60.0.0</version>
<title>EasyNetQ.DI.Ninject</title>
<authors>Jeff Doolittle, Mike Hadlow</authors>
<owners>Mike Hadlow</owners>
Expand All @@ -17,7 +17,7 @@
<copyright>Copyright Mike Hadlow 2015</copyright>
<tags>RabbitMQ Messaging AMQP REST API Ninject</tags>
<dependencies>
<dependency id="EasyNetQ" version="0.53.4.0" />
<dependency id="EasyNetQ" version="0.60.0.0" />
<dependency id="Ninject" version="3.0.1.10" />
</dependencies>
</metadata>
Expand Down
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>EasyNetQ.DI.StructureMap</id>
<!-- Version gets updated from EasyNetQ.dll version number during the build's packaging process -->
<version>0.53.4.0</version>
<version>0.60.0.0</version>
<title>EasyNetQ.DI.StructureMap</title>
<authors>Jeff Doolittle, Mike Hadlow</authors>
<owners>Mike Hadlow</owners>
Expand All @@ -17,7 +17,7 @@
<copyright>Copyright Mike Hadlow 2013</copyright>
<tags>RabbitMQ Messaging AMQP REST API StructureMap</tags>
<dependencies>
<dependency id="EasyNetQ" version="0.53.4.0" />
<dependency id="EasyNetQ" version="0.60.0.0" />
<dependency id="structuremap" version="4.0.0.315" />
</dependencies>
</metadata>
Expand Down
4 changes: 2 additions & 2 deletions Package/EasyNetQ.DI.Windsor/EasyNetQ.DI.Windsor.nuspec
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>EasyNetQ.DI.Windsor</id>
<!-- Version gets updated from EasyNetQ.dll version number during the build's packaging process -->
<version>0.53.4.0</version>
<version>0.60.0.0</version>
<title>EasyNetQ.DI.Windsor</title>
<authors>Jeff Doolittle, Mike Hadlow</authors>
<owners>Mike Hadlow</owners>
Expand All @@ -17,7 +17,7 @@
<copyright>Copyright Mike Hadlow 2015</copyright>
<tags>RabbitMQ Messaging AMQP REST API Windsor</tags>
<dependencies>
<dependency id="EasyNetQ" version="0.53.4.0" />
<dependency id="EasyNetQ" version="0.60.0.0" />
<dependency id="Castle.Windsor" version="3.2.1" />
<dependency id="Castle.Core" version="3.2.2" />
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions Package/EasyNetQ.Serilog/EasyNetQ.Serilog.nuspec
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>EasyNetQ.Serilog</id>
<!-- Version gets updated from EasyNetQ.dll version number during the build's packaging process -->
<version>0.53.4.0</version>
<version>0.60.0.0</version>
<title>EasyNetQ.Serilog</title>
<authors>Wiebe Tijsma, Mike Hadlow</authors>
<owners>Mike Hadlow</owners>
Expand All @@ -17,7 +17,7 @@
<copyright>Copyright Wiebe Tijsma 2015</copyright>
<tags>RabbitMQ Messaging AMQP REST API Serilog</tags>
<dependencies>
<dependency id="EasyNetQ" version="0.53.4.0" />
<dependency id="EasyNetQ" version="0.60.0.0" />
<dependency id="Serilog" version="1.5.11" />
</dependencies>
</metadata>
Expand Down
4 changes: 2 additions & 2 deletions Package/EasyNetQ/EasyNetQ.nuspec
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>EasyNetQ</id>
<!-- Version gets updated from EasyNetQ.dll version number during the build's packaging process -->
<version>0.53.4.0</version>
<version>0.60.0.0</version>
<title>EasyNetQ</title>
<authors>Mike Hadlow, Contributors (see GitHub repo)</authors>
<owners>Mike Hadlow</owners>
Expand All @@ -17,7 +17,7 @@
<copyright>Copyright Mike Hadlow 2015</copyright>
<tags>RabbitMQ Messaging AMQP</tags>
<dependencies>
<dependency id="RabbitMQ.Client" version="[3.6.0,]" />
<dependency id="RabbitMQ.Client" version="[3.6.0,]" />
</dependencies>
</metadata>
</package>
6 changes: 0 additions & 6 deletions Source/EasyNetQ.Hosepipe/EasyNetQHosepipeException.cs
@@ -1,9 +1,7 @@
using System;
using System.Runtime.Serialization;

namespace EasyNetQ.Hosepipe
{
[Serializable]
public class EasyNetQHosepipeException : Exception
{
//
Expand All @@ -16,9 +14,5 @@ public class EasyNetQHosepipeException : Exception
public EasyNetQHosepipeException() {}
public EasyNetQHosepipeException(string message) : base(message) {}
public EasyNetQHosepipeException(string message, Exception inner) : base(message, inner) {}

protected EasyNetQHosepipeException(
SerializationInfo info,
StreamingContext context) : base(info, context) {}
}
}
7 changes: 0 additions & 7 deletions Source/EasyNetQ.Tests.Messages/Messages.cs
Expand Up @@ -2,13 +2,11 @@

namespace EasyNetQ.Tests
{
[Serializable]
public class TestPerformanceMessage
{
public string Text { get; set; }
}

[Serializable]
public class TestRequestMessage
{
public long Id { get; set; }
Expand All @@ -18,32 +16,27 @@ public class TestRequestMessage
public bool CausesServerToTakeALongTimeToRespond { get; set; }
}

[Serializable]
public class TestResponseMessage
{
public long Id { get; set; }
public string Text { get; set; }
}

[Serializable]
public class TestAsyncRequestMessage
{
public string Text { get; set; }
}

[Serializable]
public class TestAsyncResponseMessage
{
public string Text { get; set; }
}

[Serializable]
public class StartMessage
{
public string Text { get; set; }
}

[Serializable]
public class EndMessage
{
public string Text { get; set; }
Expand Down
10 changes: 0 additions & 10 deletions Source/EasyNetQ.Tests.Tasks/Tasks/TestSimpleService.cs
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Net.CommandLine;
Expand Down Expand Up @@ -95,7 +91,6 @@ public void Dispose()
}
}

[Serializable]
public class SomeRandomException : Exception
{
//
Expand All @@ -108,10 +103,5 @@ public class SomeRandomException : Exception
public SomeRandomException() { }
public SomeRandomException(string message) : base(message) { }
public SomeRandomException(string message, Exception inner) : base(message, inner) { }

protected SomeRandomException(
SerializationInfo info,
StreamingContext context) : base(info, context)
{ }
}
}
3 changes: 0 additions & 3 deletions Source/EasyNetQ.Tests/Integration/ExceptionConditionsTests.cs
Expand Up @@ -141,16 +141,13 @@ public void OccasionallyKillConnections(IManagementClient client)
}
}

[Serializable]
public abstract class ErrorTestBaseMessage
{
public string Text { get; set; }
public int Id { get; set; }
}

[Serializable]
public class FromA : ErrorTestBaseMessage {}
[Serializable]
public class FromB : ErrorTestBaseMessage { }
}
}
Expand Down
6 changes: 0 additions & 6 deletions Source/EasyNetQ.Tests/Integration/RequestResponseTests.cs
@@ -1,7 +1,6 @@
// ReSharper disable InconsistentNaming

using System;
using System.Runtime.Serialization;
using System.Threading;
using NUnit.Framework;
using RabbitMQ.Client;
Expand Down Expand Up @@ -274,7 +273,6 @@ public void Should_be_able_to_do_simple_request_response_that_takes_a_long_time(

}

[Serializable]
public class SomeRandomException : Exception
{
//
Expand All @@ -287,10 +285,6 @@ public class SomeRandomException : Exception
public SomeRandomException() {}
public SomeRandomException(string message) : base(message) {}
public SomeRandomException(string message, Exception inner) : base(message, inner) {}

protected SomeRandomException(
SerializationInfo info,
StreamingContext context) : base(info, context) {}
}
}

Expand Down
Expand Up @@ -2,7 +2,6 @@

namespace EasyNetQ.Tests.Integration.Scheduling
{
[Serializable]
public class PartyInvitation
{
public string Text { get; set; }
Expand Down
Expand Up @@ -2,7 +2,6 @@

namespace EasyNetQ.AutoSubscribe
{
[Serializable]
[AttributeUsage(AttributeTargets.Method)]
public class AutoSubscriberConsumerAttribute : Attribute
{
Expand Down
Expand Up @@ -2,7 +2,6 @@

namespace EasyNetQ.AutoSubscribe
{
[Serializable]
public class AutoSubscriberConsumerInfo
{
public readonly Type ConcreteType;
Expand Down
1 change: 0 additions & 1 deletion Source/EasyNetQ/AutoSubscribe/ForTopicAttribute.cs
Expand Up @@ -2,7 +2,6 @@

namespace EasyNetQ.AutoSubscribe
{
[Serializable]
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class ForTopicAttribute : Attribute
{
Expand Down
Expand Up @@ -2,7 +2,6 @@

namespace EasyNetQ.AutoSubscribe
{
[Serializable]
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)]
public class SubscriptionConfigurationAttribute : Attribute
{
Expand Down
8 changes: 0 additions & 8 deletions Source/EasyNetQ/BasicGetResult.cs
@@ -1,5 +1,4 @@
using System;
using System.Runtime.Serialization;

namespace EasyNetQ
{
Expand Down Expand Up @@ -73,7 +72,6 @@ public BasicGetResult(byte[] body, MessageProperties properties, MessageReceived
}
}

[Serializable]
public class MessageNotAvailableException : Exception
{
//
Expand All @@ -96,11 +94,5 @@ public MessageNotAvailableException(string message) : base(message)
public MessageNotAvailableException(string message, Exception inner) : base(message, inner)
{
}

protected MessageNotAvailableException(
SerializationInfo info,
StreamingContext context) : base(info, context)
{
}
}
}
1 change: 0 additions & 1 deletion Source/EasyNetQ/DeliveryModeAttribute.cs
Expand Up @@ -2,7 +2,6 @@

namespace EasyNetQ
{
[Serializable]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false)]
public class DeliveryModeAttribute : Attribute
{
Expand Down
9 changes: 0 additions & 9 deletions Source/EasyNetQ/EasyNetQException.cs
@@ -1,38 +1,29 @@
using System;
using System.Runtime.Serialization;

namespace EasyNetQ
{
[Serializable]
public class EasyNetQException : Exception
{
public EasyNetQException() {}
public EasyNetQException(string message) : base(message) {}
public EasyNetQException(string format, params string[] args) : base(string.Format(format, args)) {}
public EasyNetQException(string message, Exception inner) : base(message, inner) {}

protected EasyNetQException(
SerializationInfo info,
StreamingContext context) : base(info, context) {}
}

[Serializable]
public class EasyNetQInvalidMessageTypeException : EasyNetQException
{
public EasyNetQInvalidMessageTypeException() {}
public EasyNetQInvalidMessageTypeException(string message) : base(message) {}
public EasyNetQInvalidMessageTypeException(string format, params string[] args) : base(format, args) {}
public EasyNetQInvalidMessageTypeException(string message, Exception inner) : base(message, inner) {}
protected EasyNetQInvalidMessageTypeException(SerializationInfo info, StreamingContext context) : base(info, context) {}
}

[Serializable]
public class EasyNetQResponderException : EasyNetQException
{
public EasyNetQResponderException() { }
public EasyNetQResponderException(string message) : base(message) { }
public EasyNetQResponderException(string format, params string[] args) : base(format, args) { }
public EasyNetQResponderException(string message, Exception inner) : base(message, inner) { }
protected EasyNetQResponderException(SerializationInfo info, StreamingContext context) : base(info, context) { }
}
}

0 comments on commit 8c086e8

Please sign in to comment.