예제 #1
0
파일: Pool.cs 프로젝트: waynz0r/xenadmin
        public Host SmallerVersionHost()
        {
            Host hostWithSmallerVersion = null;

            foreach (var host in this.Connection.Cache.Hosts)
            {
                if (hostWithSmallerVersion == null)
                {
                    hostWithSmallerVersion = host;
                }
                else if (Helpers.productVersionCompare(hostWithSmallerVersion.ProductVersion(), host.ProductVersion()) > 0)
                {
                    hostWithSmallerVersion = host;
                }
            }
            return(hostWithSmallerVersion);
        }