From 39c66558cfedfbb28b11c37cd43ef39adcbe1d26 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 10 Feb 2021 08:27:36 -0600 Subject: more docs --- src/slskd/Options.cs | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) (limited to 'src/slskd/Options.cs') diff --git a/src/slskd/Options.cs b/src/slskd/Options.cs index b48853ef..af78e68d 100644 --- a/src/slskd/Options.cs +++ b/src/slskd/Options.cs @@ -1,12 +1,32 @@ -namespace slskd +// +// Copyright (c) slskd Team. All rights reserved. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see https://www.gnu.org/licenses/. +// + +namespace slskd { - using slskd.Validation; - using Soulseek.Diagnostics; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Diagnostics; + using slskd.Validation; + using Soulseek.Diagnostics; + /// + /// Defines an option mapping. + /// public record Option(char ShortName, string LongName, string EnvironmentVariable, string Key, Type Type, object Default = null, string Description = null); public class Options @@ -17,11 +37,11 @@ public bool NoLogo { get; private set; } = false; public string InstanceName { get; private set; } = "default"; [Validate] - public DirectoriesOptions Directories { get; private set; } = new DirectoriesOptions(); + public DirectoriesOptions Directories { get; private set; } = new DirectoriesOptions(); [Validate] - public WebOptions Web { get; private set; } = new WebOptions(); + public WebOptions Web { get; private set; } = new WebOptions(); [Validate] - public LoggerOptions Logger { get; private set; } = new LoggerOptions(); + public LoggerOptions Logger { get; private set; } = new LoggerOptions(); [Validate] public FeatureOptions Feature { get; private set; } = new FeatureOptions(); [Validate] @@ -336,7 +356,7 @@ ShortName: default, LongName: "prometheus", EnvironmentVariable: "PROMETHEUS", - Key: "slskd:feature:prometheus", + Key: "slskd:feature:prometheus", Type: typeof(bool), Default: Defaults.Feature.Prometheus, Description: "enable collection and publishing of prometheus metrics"), -- cgit v1.2.3