This repository has been archived by the owner on Jul 16, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Abc-Arbitrage/SubscriptionMode
LGTM
- Loading branch information
Showing
9 changed files
with
118 additions
and
11 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
9 changes: 9 additions & 0 deletions
9
src/Abc.Zebus.Tests/Dispatch/DispatchMessages/ManualCommand.cs
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using ProtoBuf; | ||
|
||
namespace Abc.Zebus.Tests.Dispatch.DispatchMessages | ||
{ | ||
[ProtoContract] | ||
public class ManualCommand : ICommand | ||
{ | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/Abc.Zebus.Tests/Dispatch/DispatchMessages/ManualCommandHandler.cs
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Abc.Zebus.Tests.Dispatch.DispatchMessages | ||
{ | ||
public class ManualCommandHandler | ||
{ | ||
|
||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace Abc.Zebus | ||
{ | ||
public enum SubscriptionMode | ||
{ | ||
/// <summary> | ||
/// A subscription for the handler message type will be automatically performed on startup. | ||
/// This is the default mode for non-routable messages. | ||
/// </summary> | ||
Auto, | ||
/// <summary> | ||
/// The subscription for the handler message type must be manually performed with <code>IBus.Subscribe</code>. | ||
/// This is the default mode for routable messages. | ||
/// </summary> | ||
Manual, | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
|
||
namespace Abc.Zebus | ||
{ | ||
/// <summary> | ||
/// Specifies the subscription mode of the target message handler. | ||
/// </summary> | ||
public class SubscriptionModeAttribute : Attribute | ||
{ | ||
public SubscriptionModeAttribute(SubscriptionMode subscriptionMode) | ||
{ | ||
SubscriptionMode = subscriptionMode; | ||
} | ||
|
||
public SubscriptionMode SubscriptionMode { get; private set; } | ||
} | ||
} |