fixes some warnings and make properties init only

This commit is contained in:
Philipp Häfelfinger 2022-11-19 10:02:14 +01:00
parent 5952664e2b
commit 343fc29238
1 changed files with 5 additions and 3 deletions

View File

@ -1,15 +1,17 @@
using System.Diagnostics.CodeAnalysis;
using CommandLine;
namespace Piwigo.Client.Cli;
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "used by command line parser")]
internal class BaseOptions
{
[Option('s', "server", Required = true, HelpText = "Piwigo server url")]
public string ServerUrl { get; set; } = null!;
public string ServerUrl { get; init; } = null!;
[Option('u', "user", Required = true, HelpText = "Username to log into piwigo")]
public string UserName { get; set; } = null!;
public string UserName { get; init; } = null!;
[Option('p', "password", Required = true, HelpText = "Password to log into piwigo")]
public string Password { get; set; } = null!;
public string Password { get; init; } = null!;
}