Skip to content

Commit

Permalink
(#123) Rename DeleteQueue -> QueueDelete
Browse files Browse the repository at this point in the history
  • Loading branch information
pardahlman committed Feb 5, 2017
1 parent c4be870 commit 6728b1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ MessageSequence<TMessage> IMessageSequenceBuilder.Complete<TMessage>()
_client
.InvokeAsync(p => p
.Use<TransientChannelMiddleware>()
.Use<DeleteQueueMiddleware>(new DeleteQueueOptions
.Use<QueueDeleteMiddleware>(new QueueDeleteOptions
{
QueueNameFunc = context => $"state_machine_{Model.Id}"
}))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@

namespace RawRabbit.Pipe.Middleware
{
public class DeleteQueueOptions
public class QueueDeleteOptions
{
public Func<IPipeContext, string> QueueNameFunc { get; set; }
public Func<IPipeContext, IModel> ChannelFunc { get; set; }
public Func<IPipeContext, bool> IfUnusedFunc { get; set; }
public Func<IPipeContext, bool> IfEmptyFunc { get; set; }
}

public class DeleteQueueMiddleware : Middleware
public class QueueDeleteMiddleware : Middleware
{
protected Func<IPipeContext, IModel> ChannelFunc;
protected Func<IPipeContext, string> QueueNameFunc;
protected Func<IPipeContext, bool> IfUnusedFunc;
protected Func<IPipeContext, bool> IfEmptyFunc;

public DeleteQueueMiddleware(DeleteQueueOptions options = null)
public QueueDeleteMiddleware(QueueDeleteOptions options = null)
{
ChannelFunc = options?.ChannelFunc ?? (context => context.GetTransientChannel());
QueueNameFunc = options?.QueueNameFunc ?? (context => string.Empty);
Expand Down

0 comments on commit 6728b1f

Please sign in to comment.