예제 #1
0
        public bool AddRule(IRewriteRule rule)
        {
            if (rule == null)
                throw new ArgumentNullException("rule");

            return this.rules.Add(rule);
        }
예제 #2
0
 /// <inheritdoc />
 public void AddRewriteRule(IRewriteRule rule)
 {
     _rewriteRules.Add(rule);
 }
예제 #3
0
 /// <summary>
 /// Add a rewrite rule and configure them in the next constructing pipeline.
 /// </summary>
 /// <param name="builder">The <see cref="IHostBuilder"/></param>
 /// <param name="rewriteRule">The <see cref="IRewriteRule"/></param>
 /// <returns>The <see cref="IHostBuilder"/></returns>
 public static IHostBuilder AddRewriteRule(this IHostBuilder builder, IRewriteRule rewriteRule)
 {
     builder.ConfigureServices(services => services.AddSingleton(rewriteRule));
     return(builder);
 }
 /// <inheritdoc />
 public void AddRewriteRule(IRewriteRule rule)
 {
     _rewriteRules.Add(rule);
 }