private int ParseLoginCommand(string[] args)
{
return CommandLine.Parser.Default.ParseArguments<LoginOptions>(args).MapResult(
options => {
credentials.Endpoints = new List<string> { options.Endpoint };
credentials.Username = options.User;
credentials.Password = options.Password;
return 0;
},
errs => 1);
}