@@ -1,25 +0,0 @@ | |||||
**/.classpath | |||||
**/.dockerignore | |||||
**/.env | |||||
**/.git | |||||
**/.gitignore | |||||
**/.project | |||||
**/.settings | |||||
**/.toolstarget | |||||
**/.vs | |||||
**/.vscode | |||||
**/*.*proj.user | |||||
**/*.dbmdl | |||||
**/*.jfm | |||||
**/azds.yaml | |||||
**/bin | |||||
**/charts | |||||
**/docker-compose* | |||||
**/Dockerfile* | |||||
**/node_modules | |||||
**/npm-debug.log | |||||
**/obj | |||||
**/secrets.dev.yaml | |||||
**/values.dev.yaml | |||||
LICENSE | |||||
README.md |
@@ -1,8 +1,8 @@ | |||||
<Project> | <Project> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
<VersionMajor>5</VersionMajor> | <VersionMajor>5</VersionMajor> | ||||
<VersionMinor>1</VersionMinor> | |||||
<VersionPatch>4</VersionPatch> | |||||
<VersionMinor>2</VersionMinor> | |||||
<VersionPatch>0</VersionPatch> | |||||
<VersionQuality></VersionQuality> | <VersionQuality></VersionQuality> | ||||
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix> | <VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
@@ -1,39 +1,39 @@ | |||||
// Copyright (c) .NET Core Community. All rights reserved. | |||||
// Licensed under the MIT License. See License.txt in the project root for license information. | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Collections.ObjectModel; | |||||
using DotNetCore.CAP.Internal; | |||||
// ReSharper disable once CheckNamespace | |||||
namespace DotNetCore.CAP | |||||
{ | |||||
public class CapSubscribeAttribute : TopicAttribute | |||||
// Copyright (c) .NET Core Community. All rights reserved. | |||||
// Licensed under the MIT License. See License.txt in the project root for license information. | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Collections.ObjectModel; | |||||
using DotNetCore.CAP.Internal; | |||||
// ReSharper disable once CheckNamespace | |||||
namespace DotNetCore.CAP | |||||
{ | |||||
public class CapSubscribeAttribute : TopicAttribute | |||||
{ | { | ||||
public CapSubscribeAttribute(string name, bool isPartial = false) | |||||
: base(name, isPartial) | |||||
public CapSubscribeAttribute(string name, bool isPartial = false) | |||||
: base(name, isPartial) | |||||
{ | { | ||||
} | } | ||||
public override string ToString() | |||||
{ | |||||
return Name; | |||||
} | |||||
} | |||||
[AttributeUsage(AttributeTargets.Parameter)] | |||||
public class FromCapAttribute : Attribute | |||||
{ | |||||
} | |||||
public class CapHeader : ReadOnlyDictionary<string, string> | |||||
{ | |||||
public CapHeader(IDictionary<string, string> dictionary) : base(dictionary) | |||||
{ | |||||
} | |||||
} | |||||
public override string ToString() | |||||
{ | |||||
return Name; | |||||
} | |||||
} | |||||
[AttributeUsage(AttributeTargets.Parameter)] | |||||
public class FromCapAttribute : Attribute | |||||
{ | |||||
} | |||||
public class CapHeader : ReadOnlyDictionary<string, string> | |||||
{ | |||||
public CapHeader(IDictionary<string, string> dictionary) : base(dictionary) | |||||
{ | |||||
} | |||||
} | |||||
} | } |
@@ -131,7 +131,7 @@ namespace DotNetCore.CAP.Internal | |||||
// Ignore partial attributes when no topic attribute is defined on class. | // Ignore partial attributes when no topic attribute is defined on class. | ||||
if (topicClassAttribute is null) | if (topicClassAttribute is null) | ||||
{ | { | ||||
topicMethodAttributes = topicMethodAttributes.Where(x => !x.IsPartial); | |||||
topicMethodAttributes = topicMethodAttributes.Where(x => !x.IsPartial && x.Name != null); | |||||
} | } | ||||
if (!topicMethodAttributes.Any()) | if (!topicMethodAttributes.Any()) | ||||
@@ -189,6 +189,11 @@ namespace DotNetCore.CAP.Internal | |||||
private ConsumerExecutorDescriptor MatchUsingName(string key, IReadOnlyList<ConsumerExecutorDescriptor> executeDescriptor) | private ConsumerExecutorDescriptor MatchUsingName(string key, IReadOnlyList<ConsumerExecutorDescriptor> executeDescriptor) | ||||
{ | { | ||||
if (key == null) | |||||
{ | |||||
throw new ArgumentNullException(nameof(key)); | |||||
} | |||||
return executeDescriptor.FirstOrDefault(x => x.TopicName.Equals(key, StringComparison.InvariantCultureIgnoreCase)); | return executeDescriptor.FirstOrDefault(x => x.TopicName.Equals(key, StringComparison.InvariantCultureIgnoreCase)); | ||||
} | } | ||||