about summary refs log tree commit diff
path: root/BugMine.Sdk/ServiceInstaller.cs
blob: 06309ac9124db216a4fbd3b603cbc07ff5361001 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using LibMatrix.Services;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

public static class ServiceInstaller {
    /// <summary>
    /// Adds BugMine SDK services to the service collection.
    /// </summary>
    /// <param name="services">Service collection</param>
    /// <param name="config">Optional BugMine SDK configuration</param>
    /// <returns>Input service collection</returns>
    public static IServiceCollection AddBugMine(this IServiceCollection services, BugMineSdkConfiguration? config = null) {
        services.AddRoryLibMatrixServices(new() {
            AppName = config?.AppName ?? "BugMine SDK app"
        });
        return services;
    }
}

/// <summary>
/// Configuration for the BugMine SDK.
/// </summary>
public class BugMineSdkConfiguration {
    public string AppName { get; set; } = "BugMine SDK app";
}