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

xaviersolau / QPSolver / 16332377818

16 Jul 2025 11:21PM UTC coverage: 77.815%. First build
16332377818

push

github

xaviersolau
Initial import.

235 of 302 new or added lines in 10 files covered. (77.81%)

235 of 302 relevant lines covered (77.81%)

671207.23 hits per line

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

0.0
/src/libs/SoloX.QPSolver/ServiceCollectionExtensions.cs
1
// ----------------------------------------------------------------------
2
// <copyright file="ServiceCollectionExtensions.cs" company="Xavier Solau">
3
// Copyright © 2025 Xavier Solau.
4
// Licensed under the MIT license.
5
// See LICENSE file in the project root for full license information.
6
// </copyright>
7
// ----------------------------------------------------------------------
8

9
using Microsoft.Extensions.DependencyInjection;
10
using SoloX.QPSolver.Impl;
11

12
namespace SoloX.QPSolver
13
{
14
    /// <summary>
15
    /// Extension methods to setup the Quadratic Programming Engine
16
    /// </summary>
17
    public static class ServiceCollectionExtensions
18
    {
19
        /// <summary>
20
        /// Add Quadratic Programming Engine into the service collection.
21
        /// </summary>
22
        /// <param name="services">The service collection to initialize.</param>
23
        /// <returns>The given services.</returns>
24
        public static IServiceCollection AddQuadraticProgrammingEngine(this IServiceCollection services)
NEW
25
            => AddQuadraticProgrammingEngine(services, options => { });
×
26

27
        /// <summary>
28
        /// Add Quadratic Programming Engine into the service collection.
29
        /// </summary>
30
        /// <param name="services">The service collection to initialize.</param>
31
        /// <param name="configure">Configuration handler.</param>
32
        /// <returns>The given services.</returns>
33
        public static IServiceCollection AddQuadraticProgrammingEngine(
34
            this IServiceCollection services,
35
            Action<QPEngineOptions> configure)
36
        {
NEW
37
            services.AddSingleton<IQPEngine, QPEngine>();
×
38

NEW
39
            services.Configure<QPEngineOptions>(configure);
×
40

NEW
41
            return services;
×
42
        }
43
    }
44
}
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