mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Contains -> Get is two lookups where TryGetValue is one. Thus faster.
This commit is contained in:
@@ -61,7 +61,7 @@ public class BaseCommand : CliCommand
|
||||
Options.Remove(option);
|
||||
}
|
||||
|
||||
public string GetEnvVariableName(CliOption option) => _envHelp.ContainsKey(option) ? _envHelp[option] : null;
|
||||
public string GetEnvVariableName(CliOption option) => _envHelp.TryGetValue(option, out string value) ? value : null;
|
||||
|
||||
public void SetProperties(ParseResult context, IConfiguration config, RuntimeOs targetOs)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user