Beispiel #1
0
        /// <summary>
        /// Creates a new <see cref="SimpleQueueCacheOptionsValidator"/> instance.
        /// </summary>
        /// <param name="services">The services.</param>
        /// <param name="name">The provider name.</param>
        /// <returns>A new <see cref="SimpleQueueCacheOptionsValidator"/> instance.</returns>
        public static IConfigurationValidator Create(IServiceProvider services, string name)
        {
            SimpleQueueCacheOptions queueCacheOptions = services.GetOptionsByName <SimpleQueueCacheOptions>(name);

            return(new SimpleQueueCacheOptionsValidator(queueCacheOptions, name));
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SimpleQueueCacheOptionsValidator"/> class.
 /// </summary>
 /// <param name="options">The options.</param>
 /// <param name="name">The name.</param>
 private SimpleQueueCacheOptionsValidator(SimpleQueueCacheOptions options, string name)
 {
     this.options = options;
     this.name    = name;
 }