Пример #1
0
 /// <summary>
 /// Resets the manager.
 /// </summary>
 internal static void Reset()
 {
     if (FailoverGroup != null)
     {
         FailoverGroup = null;
     }
 }
Пример #2
0
        /// <summary>
        /// Sets the host list to be used during failover operations.
        /// </summary>
        /// <param name="hostList">The host list.</param>
        /// <param name="failoverMethod">The failover method.</param>
        internal static void SetHostList(List <XServer> hostList, FailoverMethod failoverMethod)
        {
            switch (failoverMethod)
            {
            case FailoverMethod.Sequential:
                FailoverGroup = new SequentialFailoverGroup(hostList);
                break;

            case FailoverMethod.Priority:
                FailoverGroup = new SequentialFailoverGroup(hostList.OrderByDescending(o => o.Priority).ToList());
                break;
            }
        }