예제 #1
0
 public static RewriteRule Create(RewriteRequestTemplate[] upstreams, RewriteRequestTemplate downstream)
 {
     return(new RewriteRule(upstreams, downstream));
 }
예제 #2
0
 public static RewriteRule Create(RewriteRequestTemplate upstream, RewriteRequestTemplate downstream)
 {
     return(new RewriteRule(new[] { upstream }, downstream));
 }
예제 #3
0
 private static RewriteRule Create(RewriteRequestTemplate template)
 {
     return(new RewriteRule(new RewriteRequestTemplate[0], template));
 }
예제 #4
0
 /// <summary>
 /// create RouteRewriteRule instance
 /// </summary>
 /// <param name="upstreamTemplates">upstream templates</param>
 /// <param name="downstreamTemplate">downstream template</param>
 public RewriteRule(IReadOnlyList <RewriteRequestTemplate> upstreamTemplates, RewriteRequestTemplate downstreamTemplate)
 {
     Upstreams  = upstreamTemplates.ToArray();
     Downstream = downstreamTemplate;
 }
 public IRouteRulesBuilder Rewrite(RewriteRequestTemplate template)
 {
     Builder.AddRule(new RewriteRule(templateList, template));
     return(Builder);
 }
 public RouteRewriteRuleBuilder Match(RewriteRequestTemplate template)
 {
     templateList.Add(template);
     return(this);
 }