Quellcode durchsuchen

Provide rewrite subscription attribute extension

master
Savorboard vor 5 Jahren
Ursprung
Commit
872eb40a5a
1 geänderte Dateien mit 13 neuen und 8 gelöschten Zeilen
  1. +13
    -8
      src/DotNetCore.CAP/Internal/IConsumerServiceSelector.Default.cs

+ 13
- 8
src/DotNetCore.CAP/Internal/IConsumerServiceSelector.Default.cs Datei anzeigen

@@ -123,14 +123,7 @@ namespace DotNetCore.CAP.Internal

foreach (var attr in topicAttributes)
{
if (attr.Group == null)
{
attr.Group = _capOptions.DefaultGroup + "." + _capOptions.Version;
}
else
{
attr.Group = attr.Group + "." + _capOptions.Version;
}
SetSubscribeAttribute(attr);

var parameters = method.GetParameters()
.Select(parameter => new ParameterDescriptor
@@ -145,6 +138,18 @@ namespace DotNetCore.CAP.Internal
}
}

protected virtual void SetSubscribeAttribute(TopicAttribute attribute)
{
if (attribute.Group == null)
{
attribute.Group = _capOptions.DefaultGroup + "." + _capOptions.Version;
}
else
{
attribute.Group = attribute.Group + "." + _capOptions.Version;
}
}

private static ConsumerExecutorDescriptor InitDescriptor(
TopicAttribute attr,
MethodInfo methodInfo,


Laden…
Abbrechen
Speichern