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

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

            throw ParseException.CouldNotCreateSettings(Command.SettingsType);
        }