private static CommandSettings CreateSettings(ITypeResolver resolver, Type settingsType) { if (resolver.Resolve(settingsType) is CommandSettings settings) { return(settings); } throw ParseException.CouldNotCreateSettings(settingsType); }
public CommandSettings CreateSettings(ITypeResolver resolver) { if (resolver.Resolve(Command.SettingsType) is CommandSettings settings) { return(settings); } throw ParseException.CouldNotCreateSettings(Command.SettingsType); }