• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JaCraig / DragonHoard / 11993045443

24 Nov 2024 04:12AM UTC coverage: 60.754%. First build
11993045443

push

github

JaCraig
feat: Update to .NET 8/9, centralized workflows, and refactoring

Updated target frameworks to .NET 8.0 and 9.0. Updated various package references to newer versions. Added new package reference for `coverlet.msbuild`. Removed inclusion of `..\.editorconfig` in `DragonHoard.InMemory.csproj`. Simplified method implementations using expression-bodied members. Added missing `using DragonHoard.Core;` statement. Refactored methods in `DragonHoardRegistrationExtensions.cs` and `MemoryCache.cs` for conciseness. Updated `docfx.json` to target `net8.0`. Centralized workflows for Dependabot, CodeQL, documentation, .NET publishing, and testing.

114 of 228 branches covered (50.0%)

Branch coverage included in aggregate %.

4 of 11 new or added lines in 3 files covered. (36.36%)

273 of 409 relevant lines covered (66.75%)

193406.25 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

45.45
/DragonHoard.Core/ExtensionMethods/DragonHoardRegistrationExtensions.cs
1
/*
2
Copyright 2021 James Craig
3

4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7

8
    http://www.apache.org/licenses/LICENSE-2.0
9

10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16

17
using Canister.Interfaces;
18
using DragonHoard.Core;
19
using DragonHoard.Core.Interfaces;
20

21
namespace Microsoft.Extensions.DependencyInjection
22
{
23
    /// <summary>
24
    /// Reg extensions
25
    /// </summary>
26
    public static class DragonHoardRegistrationExtensions
27
    {
28
        /// <summary>
29
        /// Adds the dragon hoard.
30
        /// </summary>
31
        /// <param name="services">The services.</param>
32
        /// <returns>The service collection</returns>
33
        public static IServiceCollection? AddDragonHoard(this IServiceCollection? services)
34
        {
35
            if (services.Exists<Cache>())
2!
36
                return services;
×
37
            return services?.AddSingleton<Cache>()
2!
38
                .AddAllSingleton<ICache>();
2✔
39
        }
40

41
        /// <summary>
42
        /// Registers the dragon hoard.
43
        /// </summary>
44
        /// <param name="bootstrapper">The bootstrapper.</param>
45
        /// <returns>The configuration object.</returns>
NEW
46
        public static ICanisterConfiguration? RegisterDragonHoard(this ICanisterConfiguration? bootstrapper) => bootstrapper?.AddAssembly(typeof(DragonHoardRegistrationExtensions).Assembly);
×
47
    }
48
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc