2016-12-05 08:00:09 +01:00
|
|
|
|
using System;
|
2019-05-20 15:24:12 +02:00
|
|
|
|
using JetBrains.Annotations;
|
2016-12-05 08:00:09 +01:00
|
|
|
|
|
|
|
|
|
namespace Tapeti.Annotations
|
|
|
|
|
{
|
2019-03-19 11:47:52 +01:00
|
|
|
|
/// <inheritdoc />
|
2016-12-05 08:00:09 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Binds to an existing durable queue to receive messages. Can be used
|
|
|
|
|
/// on an entire MessageController class or on individual methods.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
|
2019-05-27 11:48:10 +02:00
|
|
|
|
[MeansImplicitUse(ImplicitUseTargetFlags.WithMembers)]
|
2017-02-12 19:15:56 +01:00
|
|
|
|
public class DurableQueueAttribute : Attribute
|
2016-12-05 08:00:09 +01:00
|
|
|
|
{
|
2019-05-27 11:48:10 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Specifies the name of the durable queue (must already be declared).
|
|
|
|
|
/// </summary>
|
2016-12-05 08:00:09 +01:00
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
|
2019-03-19 11:47:52 +01:00
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
/// <param name="name">The name of the durable queue</param>
|
2017-02-12 19:15:56 +01:00
|
|
|
|
public DurableQueueAttribute(string name)
|
2016-12-05 08:00:09 +01:00
|
|
|
|
{
|
|
|
|
|
Name = name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|