瀏覽代碼

rename cap attribute routekey

master
Savorboard 7 年之前
父節點
當前提交
847a9ecbce
共有 5 個檔案被更改,包括 11 行新增11 行删除
  1. +6
    -6
      src/DotNetCore.CAP.Kafka/CapSubscribeAttribute.cs
  2. +1
    -1
      src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs
  3. +1
    -1
      src/DotNetCore.CAP.RabbitMQ/CapSubscribeAttribute.cs
  4. +1
    -1
      src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs
  5. +2
    -2
      src/DotNetCore.CAP/Abstractions/TopicAttribute.cs

+ 6
- 6
src/DotNetCore.CAP.Kafka/CapSubscribeAttribute.cs 查看文件

@@ -4,24 +4,24 @@ namespace DotNetCore.CAP.Kafka
{
public class CapSubscribeAttribute : TopicAttribute
{
public CapSubscribeAttribute(string topicName)
: this(topicName, 0)
public CapSubscribeAttribute(string name)
: this(name, 0)
{
}

/// <summary>
/// Not support
/// </summary>
public CapSubscribeAttribute(string topicName, int partition)
: this(topicName, partition, 0)
public CapSubscribeAttribute(string name, int partition)
: this(name, partition, 0)
{
}

/// <summary>
/// Not support
/// </summary>
public CapSubscribeAttribute(string topicName, int partition, long offset)
: base(topicName)
public CapSubscribeAttribute(string name, int partition, long offset)
: base(name)
{
Offset = offset;
Partition = partition;


+ 1
- 1
src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs 查看文件

@@ -73,7 +73,7 @@ namespace DotNetCore.CAP.Kafka
var message = new MessageContext
{
Group = _groupId,
KeyName = e.Topic,
Name = e.Topic,
Content = e.Value
};
MessageReceieved?.Invoke(sender, message);


+ 1
- 1
src/DotNetCore.CAP.RabbitMQ/CapSubscribeAttribute.cs 查看文件

@@ -4,7 +4,7 @@ namespace DotNetCore.CAP.RabbitMQ
{
public class CapSubscribeAttribute : TopicAttribute
{
public CapSubscribeAttribute(string routingKey) : base(routingKey)
public CapSubscribeAttribute(string name) : base(name)
{

}


+ 1
- 1
src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs 查看文件

@@ -87,7 +87,7 @@ namespace DotNetCore.CAP.RabbitMQ
var message = new MessageContext
{
Group = _queueName,
KeyName = e.RoutingKey,
Name = e.RoutingKey,
Content = Encoding.UTF8.GetString(e.Body)
};
MessageReceieved?.Invoke(sender, message);


+ 2
- 2
src/DotNetCore.CAP/Abstractions/TopicAttribute.cs 查看文件

@@ -8,9 +8,9 @@ namespace DotNetCore.CAP.Abstractions
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = true)]
public abstract class TopicAttribute : Attribute
{
protected TopicAttribute(string topicName)
protected TopicAttribute(string name)
{
Name = topicName;
Name = name;
}

/// <summary>


Loading…
取消
儲存