about summary refs log tree commit diff
path: root/BugMine.Sdk/ServiceInstaller.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-04-20 23:48:43 +0200
committerRory& <root@rory.gay>2024-04-20 23:48:43 +0200
commit68fe1a2284045908d92ef06c1c26cd937ded784e (patch)
tree71144f404f060888dcc5e4036e038abe857adc4e /BugMine.Sdk/ServiceInstaller.cs
parentStart adding pages (diff)
downloadBugMine-68fe1a2284045908d92ef06c1c26cd937ded784e.tar.xz
Add basic project management
Diffstat (limited to 'BugMine.Sdk/ServiceInstaller.cs')
-rw-r--r--BugMine.Sdk/ServiceInstaller.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/BugMine.Sdk/ServiceInstaller.cs b/BugMine.Sdk/ServiceInstaller.cs
new file mode 100644

index 0000000..06309ac --- /dev/null +++ b/BugMine.Sdk/ServiceInstaller.cs
@@ -0,0 +1,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"; +} \ No newline at end of file