Sfoglia il codice sorgente

Executor key not unique (#696)

Co-authored-by: Patrick Heemskerk <pheemskerk@inforit.nl>
master
patheems 4 anni fa
committed by GitHub
parent
commit
755f210390
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 4AEE18F83AFDEB23
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. +2
    -1
      src/DotNetCore.CAP/Internal/ISubscribeInvoker.Default.cs

+ 2
- 1
src/DotNetCore.CAP/Internal/ISubscribeInvoker.Default.cs Vedi File

@@ -35,10 +35,11 @@ namespace DotNetCore.CAP.Internal
cancellationToken.ThrowIfCancellationRequested();

var methodInfo = context.ConsumerDescriptor.MethodInfo;
var serviceTypeInfo = context.ConsumerDescriptor.ServiceTypeInfo.Name;

_logger.LogDebug("Executing subscriber method : {0}", methodInfo.Name);

var key = $"{methodInfo.Module.Name}_{methodInfo.MetadataToken}";
var key = $"{methodInfo.Module.Name}_{serviceTypeInfo}_{methodInfo.MetadataToken}";
var executor = _executors.GetOrAdd(key, x => ObjectMethodExecutor.Create(methodInfo, context.ConsumerDescriptor.ImplTypeInfo));

using var scope = _serviceProvider.CreateScope();


Caricamento…
Annulla
Salva