-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensured a new CommandProcessorProvider for each Message Pump (#1866)
* Ensured a new CommandProcessorProvider for each Message Pump * Downgrade Microsoft.Data.SqlClient to 3.0.1 * Plumbed the CommandProcessor Factory down to the creation of each Message Pump
- Loading branch information
Showing
12 changed files
with
54 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#region Licence | ||
#region Licence | ||
/* The MIT License (MIT) | ||
Copyright © 2014 Ian Cooper <[email protected]> | ||
|
@@ -22,6 +22,7 @@ THE SOFTWARE. */ | |
|
||
#endregion | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
|
@@ -33,9 +34,9 @@ namespace Paramore.Brighter.ServiceActivator | |
/// progressive interfaces to manage the requirements for a complete Dispatcher via Intellisense in the IDE. The intent is to make it easier to | ||
/// recognize those dependencies that you need to configure | ||
/// </summary> | ||
public class DispatchBuilder : INeedACommandProcessorProvider, INeedAChannelFactory, INeedAMessageMapper, INeedAListOfConnections, IAmADispatchBuilder | ||
public class DispatchBuilder : INeedACommandProcessorFactory, INeedAChannelFactory, INeedAMessageMapper, INeedAListOfConnections, IAmADispatchBuilder | ||
{ | ||
private IAmACommandProcessorProvider _commandProcessorProvider; | ||
private Func<IAmACommandProcessorProvider> _commandProcessorFactory; | ||
private IAmAMessageMapperRegistry _messageMapperRegistry; | ||
private IAmAChannelFactory _defaultChannelFactory; | ||
private IEnumerable<Subscription> _connections; | ||
|
@@ -46,19 +47,19 @@ private DispatchBuilder() { } | |
/// Begins the fluent interface | ||
/// </summary> | ||
/// <returns>INeedALogger.</returns> | ||
public static INeedACommandProcessorProvider With() | ||
public static INeedACommandProcessorFactory With() | ||
{ | ||
return new DispatchBuilder(); | ||
} | ||
|
||
/// <summary> | ||
/// The command processor used to send and publish messages to handlers by the service activator. | ||
/// </summary> | ||
/// <param name="theCommandProcessorProvider">The command processor provider.</param> | ||
/// <param name="commandProcessorFactory">The command processor Factory.</param> | ||
/// <returns>INeedAMessageMapper.</returns> | ||
public INeedAMessageMapper CommandProcessorProvider(IAmACommandProcessorProvider theCommandProcessorProvider) | ||
public INeedAMessageMapper CommandProcessorFactory(Func<IAmACommandProcessorProvider> commandProcessorFactory) | ||
{ | ||
_commandProcessorProvider = theCommandProcessorProvider; | ||
_commandProcessorFactory = commandProcessorFactory; | ||
return this; | ||
} | ||
|
||
|
@@ -109,7 +110,7 @@ public IAmADispatchBuilder Connections(IEnumerable<Subscription> connections) | |
/// <returns>Dispatcher.</returns> | ||
public Dispatcher Build() | ||
{ | ||
return new Dispatcher(_commandProcessorProvider, _messageMapperRegistry, _connections); | ||
return new Dispatcher(_commandProcessorFactory, _messageMapperRegistry, _connections); | ||
} | ||
} | ||
|
||
|
@@ -118,14 +119,14 @@ public Dispatcher Build() | |
/// <summary> | ||
/// Interface INeedACommandProcessor | ||
/// </summary> | ||
public interface INeedACommandProcessorProvider | ||
public interface INeedACommandProcessorFactory | ||
{ | ||
/// <summary> | ||
/// The command processor used to send and publish messages to handlers by the service activator. | ||
/// </summary> | ||
/// <param name="commandProcessorProvider">The command processor provider.</param> | ||
/// <param name="commandProcessorFactory">The command processor provider Factory.</param> | ||
/// <returns>INeedAMessageMapper.</returns> | ||
INeedAMessageMapper CommandProcessorProvider(IAmACommandProcessorProvider commandProcessorProvider); | ||
INeedAMessageMapper CommandProcessorFactory(Func<IAmACommandProcessorProvider> commandProcessorFactory); | ||
} | ||
|
||
/// <summary> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters