< Summary

Information
Class: Elsa.Persistence.EFCore.CustomDbContextOptionsExtensionInfo
Assembly: Elsa.Persistence.EFCore.Common
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Common/CustomDbContextOptionsExtensionInfo.cs
Line coverage
85%
Covered lines: 6
Uncovered lines: 1
Coverable lines: 7
Total lines: 39
Line coverage: 85.7%
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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_IsDatabaseProvider()100%11100%
get_LogFragment()100%210%
GetServiceProviderHashCode()100%11100%
PopulateDebugInfo(...)100%11100%
ShouldUseSameServiceProvider(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.Common/CustomDbContextOptionsExtensionInfo.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Infrastructure;
 2
 3namespace Elsa.Persistence.EFCore;
 4
 5/// <summary>
 6/// Contains options for configuring Elsa's Entity Framework Core integration.
 7/// </summary>
 8public class CustomDbContextOptionsExtensionInfo : DbContextOptionsExtensionInfo
 9{
 10    /// <inheritdoc />
 11    public CustomDbContextOptionsExtensionInfo(IDbContextOptionsExtension extension)
 3599412        : base(extension)
 13    {
 3599414    }
 15
 16    /// <inheritdoc />
 117    public override bool IsDatabaseProvider => false;
 18
 19    /// <inheritdoc />
 020    public override string LogFragment => "";
 21
 22    /// <inheritdoc />
 23    public override int GetServiceProviderHashCode()
 24    {
 25        // Return a unique hash code for your custom extension
 1199826        return 0;
 27    }
 28
 29    /// <inheritdoc />
 30    public override void PopulateDebugInfo(IDictionary<string, string> debugInfo)
 31    {
 132    }
 33
 34    /// <inheritdoc />
 35    public override bool ShouldUseSameServiceProvider(DbContextOptionsExtensionInfo other)
 36    {
 1199737        return true;
 38    }
 39}