public ProxyOptions GetOptions(EBasePaths path) { InMemoryServicePaths inMemoryServices = InMemoryServicePaths.Instance(); var service = inMemoryServices.GetService(path); var(scheme, host, port) = GetUriComponents(service.Config.UriBase); return(new ProxyOptions() { Scheme = scheme, Host = host, Port = port }); }
public ServiceInitialPath(EBasePaths path, ApiConfig config) { Path = path.ToString(); Config = config; }
public bool ServiceExist(EBasePaths basePath, string currentPath = "") { return(GetService(basePath, currentPath) != null); }
public ServiceInitialPath GetService(EBasePaths basePath, string currentPath = "") { return(GetServices(currentPath) .Where(x => x.Path.Equals(basePath.ToString(), StringComparison.OrdinalIgnoreCase)) .FirstOrDefault()); }