namespace slskd { using System; using System.Collections.Generic; public record Option(char ShortName, string LongName, string EnvironmentVariable, Type Type, string Key, string Description = null); public static class Configuration { public static EnvironmentVariable ToEnvironmentVariable(this Option option) => new EnvironmentVariable(option.EnvironmentVariable, option.Type, option.Key, option.Description); public static CommandLineArgument ToCommandLineArgument(this Option option) => new CommandLineArgument(option.ShortName, option.LongName, option.Type, option.Key, option.Description); public static IEnumerable