Ejemplo n.º 1
0
        /// <summary>
        /// Applies a collection of default conventions, such as applying options in attributes
        /// on the model type,
        /// </summary>
        /// <returns>The builder.</returns>
        public static IConventionBuilder UseAttributes(this IConventionBuilder builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            return(builder
                   .UseCommandAttribute()
                   .UseVersionOptionFromMemberAttribute()
                   .UseVersionOptionAttribute()
                   .UseHelpOptionAttribute()
                   .UseOptionAttributes()
                   .UseArgumentAttributes()
                   .UseSubcommandAttributes());
        }