Example #1
0
        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
            });
        }
Example #2
0
 public ServiceInitialPath(EBasePaths path, ApiConfig config)
 {
     Path   = path.ToString();
     Config = config;
 }
Example #3
0
 public bool ServiceExist(EBasePaths basePath, string currentPath = "")
 {
     return(GetService(basePath, currentPath) != null);
 }
Example #4
0
 public ServiceInitialPath GetService(EBasePaths basePath, string currentPath = "")
 {
     return(GetServices(currentPath)
            .Where(x => x.Path.Equals(basePath.ToString(), StringComparison.OrdinalIgnoreCase))
            .FirstOrDefault());
 }