public static void Configure()

in RESTProxy/Models/ProxyManager.cs [88:125]


        public static void Configure(List<Endpoint> endpoints, string defaultTenantId)
        {
            foreach (Endpoint endpoint in endpoints)
            {
                string tenantId = endpoint.TenantId.ToLowerInvariant();
                string tenantFriendlyName = endpoint.TenantFriendlyName.ToLowerInvariant();

                TenantEndpointCollection tenantEndpointCollection;
                if (ProxyManager.endpointByTenantId.TryGetValue(tenantId, out tenantEndpointCollection))
                {
                    tenantEndpointCollection.Add(endpoint);
                    ProxyManager.endpointByTenantId[tenantId] = tenantEndpointCollection;
                }
                else
                {
                    tenantEndpointCollection = new TenantEndpointCollection(endpoint.TenantId, endpoint.TenantFriendlyName);
                    tenantEndpointCollection.Add(endpoint);
                    ProxyManager.endpointByTenantId.Add(tenantId, tenantEndpointCollection);
                }

                if (ProxyManager.endpointByTenantName.TryGetValue(tenantFriendlyName, out tenantEndpointCollection))
                {
                    tenantEndpointCollection.Add(endpoint);
                    ProxyManager.endpointByTenantName[tenantFriendlyName] = tenantEndpointCollection;
                }
                else
                {
                    tenantEndpointCollection = new TenantEndpointCollection(endpoint.TenantId, endpoint.TenantFriendlyName);
                    tenantEndpointCollection.Add(endpoint);
                    ProxyManager.endpointByTenantName.Add(tenantFriendlyName, tenantEndpointCollection);
                }
            }

            if (!string.IsNullOrWhiteSpace(defaultTenantId))
            {
                ProxyManager.defaultTenantId = defaultTenantId.ToLowerInvariant();
            }
        }