public static string GetLocalizationKey(this CommandLineErrorCode code) { CommandLineErrorCodeAttribute attribute = (CommandLineErrorCodeAttribute)Cache[code]; return(attribute?.LocalizationKey); }
public static string GetDefaultMessage(this CommandLineErrorCode code) { CommandLineErrorCodeAttribute attribute = (CommandLineErrorCodeAttribute)Cache[code]; return(attribute != null ? attribute.DefaultMessage : string.Empty); }