Пример #1
0
        /// <summary>
        /// Register blazorise and configures the default behaviour.
        /// </summary>
        /// <param name="serviceCollection"></param>
        /// <param name="configureOptions"></param>
        /// <returns></returns>
        public static IServiceCollection AddBlazorise(this IServiceCollection serviceCollection, Action <BlazoriseOptions> configureOptions = null)
        {
            var options = new BlazoriseOptions();

            configureOptions?.Invoke(options);

            serviceCollection.AddSingleton(options);

            return(serviceCollection);
        }
Пример #2
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="editContextValidator">Reference to the <see cref="IEditContextValidator"/> object.</param>
 /// <param name="options">Reference to the global blazorise options.</param>
 public DataAnnotationValidationHandler(IEditContextValidator editContextValidator,
                                        BlazoriseOptions options)
 {
     EditContextValidator = editContextValidator;
     Options = options;
 }