private static CommandSettings CreateSettings(ITypeResolver resolver, Type settingsType)
        {
            if (resolver.Resolve(settingsType) is CommandSettings settings)
            {
                return(settings);
            }

            throw ParseException.CouldNotCreateSettings(settingsType);
        }
示例#2
0
        public CommandSettings CreateSettings(ITypeResolver resolver)
        {
            if (resolver.Resolve(Command.SettingsType) is CommandSettings settings)
            {
                return(settings);
            }

            throw ParseException.CouldNotCreateSettings(Command.SettingsType);
        }