Ejemplo n.º 1
0
        /// <summary>
        /// Interpret a value from the software_version dictionary as a int, or 0 if we couldn't parse it.
        /// </summary>
        private int GetSVAsInt(string key)
        {
            string s = Get(software_version, key);

            if (s == null)
            {
                return(0);
            }
            return((int)Helper.GetAPIVersion(s));
        }
Ejemplo n.º 2
0
        private void SetAPIVersion()
        {
            Dictionary <XenRef <Pool>, Pool> pools = Pool.get_all_records(this);

            foreach (Pool pool in pools.Values)
            {
                Host host = Host.get_record(this, pool.master);
                APIVersion = Helper.GetAPIVersion(host.API_version_major, host.API_version_minor);
                break;
            }
        }