public string EvaluateProxyName(ProxyContext context) { var eval = context.Evaluate(ProxyNameExpression); return(string.IsNullOrWhiteSpace(eval) ? Defaults.Route.Proxy.ProxyName : eval); }
public TimeSpan EvaluateTimeout(ProxyContext context) { var result = context.Evaluate(TimeoutInMillisecondsExpression); return(long.TryParse(result, out var timeout) && timeout > 0 ? TimeSpan.FromMilliseconds(timeout) : Defaults.Route.Proxy.Upstream.Request.Sender.Timeout); }
public Version EvaluateHttpVersion(ProxyContext context) { var result = context.Evaluate(HttpVersionExpression); return(HttpVersion.ParseOrDefault(result) ?? Defaults.Route.Proxy.Upstream.Request.HttpVersion); }
public IEnumerable <string> EvaluateValues(ProxyContext context) => ValueExpressions.Select(v => context.Evaluate(v));
public string?EvaluateDomain(ProxyContext context) => context.Evaluate(DomainExpression);