< Summary

Information
Class: Gateway.Apis.Amqp.RegistrationExtensions.ServiceCollectionExtension
Assembly: Gateway
File(s): /home/runner/work/dotnet-microservice/dotnet-microservice/Gateway/Apis/Amqp/RegistrationExtensions/ServiceCollectionExtension.cs
Tag: 34_11887803474
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 16
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
AddQueueConsumer(...)100%210%

File(s)

/home/runner/work/dotnet-microservice/dotnet-microservice/Gateway/Apis/Amqp/RegistrationExtensions/ServiceCollectionExtension.cs

#LineLine coverage
 1namespace Gateway.Apis.Amqp.RegistrationExtensions
 2{
 3    public static class ServiceCollectionExtension
 4    {
 5        public static IServiceCollection AddQueueConsumer<TMessage, THandler>(
 6            this IServiceCollection services,
 7            VersionState versionState
 8        )
 9            where THandler : class, IConsumer<TMessage>
 10        {
 011            services.AddScoped<IConsumer<TMessage>, THandler>();
 012            AsyncApiConsumerFactoryBag.AddQueueConsumer<TMessage>(versionState);
 013            return services;
 14        }
 15    }
 16}