Пример #1
0
        private void BuildFields()
        {
            var newServers        = new List <Server>();
            var newServerGroupMap = new Dictionary <string, ServerGroup>(StringComparer.OrdinalIgnoreCase);

            if (ServerGroups == null)
            {
                ServerGroups = new ServerGroup[0];
            }
            ServerGroups.ForEach(serverGroup =>
            {
                newServers.AddRange(serverGroup.Servers);
                newServerGroupMap[serverGroup.GroupId] = serverGroup;
            });

            servers        = newServers;
            serverGroupMap = newServerGroupMap;
        }
Пример #2
0
 public LoadBalancerRoute(string routeId)
 {
     RouteId      = routeId;
     ServerGroups = new ServerGroup[0];
 }