1
0
mirror of synced 2024-11-24 19:53:10 +01:00

Removed MessageHandler attribute in favor of WithMembers on MessageController and Queue attributes

This commit is contained in:
Mark van Renswoude 2019-05-27 11:48:10 +02:00
parent cb552cc4cb
commit bcd2cbed69
5 changed files with 13 additions and 19 deletions

View File

@ -14,9 +14,12 @@ namespace Tapeti.Annotations
/// for deploy-time management of durable queues (shameless plug intended).
/// </remarks>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
[MeansImplicitUse]
[MeansImplicitUse(ImplicitUseTargetFlags.WithMembers)]
public class DurableQueueAttribute : Attribute
{
/// <summary>
/// Specifies the name of the durable queue (must already be declared).
/// </summary>
public string Name { get; set; }

View File

@ -12,6 +12,11 @@ namespace Tapeti.Annotations
[MeansImplicitUse]
public class DynamicQueueAttribute : Attribute
{
/// <summary>
/// An optional prefix. If specified, Tapeti will compose the queue name using the
/// prefix and a unique ID. If not specified, an empty queue name will be passed
/// to RabbitMQ thus letting it create a unique queue name.
/// </summary>
public string Prefix { get; set; }

View File

@ -9,7 +9,7 @@ namespace Tapeti.Annotations
/// when using the RegisterAllControllers method. It is not required when manually registering a controller.
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
[MeansImplicitUse]
[MeansImplicitUse(ImplicitUseTargetFlags.WithMembers)]
public class MessageControllerAttribute : Attribute
{
}

View File

@ -1,17 +0,0 @@
using System;
using JetBrains.Annotations;
namespace Tapeti.Annotations
{
/// <inheritdoc />
/// <summary>
/// This attribute does nothing in runtime and is not required. It is only used as
/// a hint to ReSharper, and maybe developers as well, to indicate the method is
/// indeed used.
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
[MeansImplicitUse]
public class MessageHandlerAttribute : Attribute
{
}
}

View File

@ -13,6 +13,9 @@ namespace Tapeti.Annotations
[AttributeUsage(AttributeTargets.Class)]
public class RequestAttribute : Attribute
{
/// <summary>
/// The type of the message class which must be returned as the response.
/// </summary>
public Type Response { get; set; }
}
}