Commit 872eb40a authored by Savorboard's avatar Savorboard

Provide rewrite subscription attribute extension

parent 10eb5209
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment