Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removed redundant ctor in msmqmessagebuilder

  • Loading branch information...
commit d3b3a5a3bf7ae9af21c52dedcd643206ff3845e8 1 parent 1123f79
mnichols authored
View
2  Rhino.ServiceBus.Tests/CanSendMsgsFromOneWayBus.cs
@@ -35,7 +35,7 @@ public void SendMessageToRemoteBus()
Endpoint = bus.Endpoint.Uri,
Name = "System",
},
- }, new MsmqMessageBuilder(container.Resolve<IMessageSerializer>(), null));
+ }, new MsmqMessageBuilder(container.Resolve<IMessageSerializer>()));
oneWay.Send("hello there, one way");
View
7 Rhino.ServiceBus/Msmq/AbstractMsmqListener.cs
@@ -62,7 +62,8 @@ public abstract class AbstractMsmqListener : IDisposable
default:
throw new ArgumentOutOfRangeException("transactional");
}
- builder = new MsmqMessageBuilder(this.messageSerializer, Endpoint);
+ messageBuilder = new MsmqMessageBuilder(this.messageSerializer);
+ this.messageBuilder.Initialize(Endpoint);
}
public event Action Started;
@@ -239,7 +240,7 @@ protected static void Raise(Action action)
protected IEndpointRouter endpointRouter;
private readonly bool? transactional;
- private readonly MsmqMessageBuilder builder;
+ private readonly MsmqMessageBuilder messageBuilder;
public TransportState TransportState { get; set; }
@@ -273,7 +274,7 @@ protected static void Raise(Action action)
protected Message GenerateMsmqMessageFromMessageBatch(params object[] msgs)
{
- return builder.BuildFromMessageBatch(msgs);
+ return messageBuilder.BuildFromMessageBatch(msgs);
}
protected object[] DeserializeMessages(OpenedQueue messageQueue, Message transportMessage, Action<CurrentMessageInformation, Exception> messageSerializationException)
View
7 Rhino.ServiceBus/Msmq/MsmqMessageBuilder.cs
@@ -14,15 +14,10 @@ public class MsmqMessageBuilder : IMessageBuilder<Message>
private readonly IMessageSerializer messageSerializer;
private Endpoint endpoint;
+
public MsmqMessageBuilder(IMessageSerializer messageSerializer)
- :this(messageSerializer, null)
- {
- }
-
- public MsmqMessageBuilder(IMessageSerializer messageSerializer, Endpoint endpoint)
{
this.messageSerializer = messageSerializer;
- this.endpoint = endpoint;
}
public Message BuildFromMessageBatch(params object[] msgs)

0 comments on commit d3b3a5a

Please sign in to comment.
Something went wrong with that request. Please try again.