Exemple #1
0
 public ReRouteOptions()
 {
     _httpMethods = new Lazy <HashSet <string> >(()
                                                 => new HashSet <string>(
                                                     UpstreamHttpMethod?.Count() > 0 ? UpstreamHttpMethod: DefaultMethodsTypes,
                                                     StringComparer.OrdinalIgnoreCase));
 }
 public AggregateReRoute AddUpstreamHttpMethod(string method)
 {
     if (!UpstreamHttpMethod.Contains(method))
     {
         UpstreamHttpMethod += method + ",";
     }
     return(this);
 }
 public AggregateReRoute RemoveUpstreamHttpMethod(string method)
 {
     if (!UpstreamHttpMethod.Contains(method))
     {
         var removeMethod = "," + method;
         UpstreamHttpMethod = UpstreamHttpMethod.Replace(removeMethod, "");
     }
     return(this);
 }