Bladeren bron

Provide rewrite subscription attribute extension

master
Savorboard 4 jaren geleden
bovenliggende
commit
872eb40a5a
1 gewijzigde bestanden met toevoegingen van 13 en 8 verwijderingen
  1. +13
    -8
      src/DotNetCore.CAP/Internal/IConsumerServiceSelector.Default.cs

+ 13
- 8
src/DotNetCore.CAP/Internal/IConsumerServiceSelector.Default.cs Bestand weergeven

@@ -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…
Annuleren
Opslaan