Пример #1
0
        public static string GetModel(string modelIdentifier)
        {
            ModelInfo info;

            if (IsSimulator(Version))
            {
                if (dic.TryGetValue(modelIdentifier, out info))
                {
                    return(info.Model + " Simulator");
                }
            }

            if (dic.TryGetValue(modelIdentifier, out info))
            {
                return(info.Model);
            }

            return("Unknown");
        }
Пример #2
0
        /// <summary>
        /// According to hardwareId, return model and chip type.
        /// </summary>
        /// <param name="hardwareId"></param>
        /// <returns>DeviceInfo</returns>
        public static ModelInfo GetDeviceInfo(this ModelInfoDic dic, string hardwareId)
        {
            ModelInfo info;

            if (dic.TryGetValue(hardwareId, out info))
            {
                return(info);
            }

            return(dic[""]);           //Unknown
        }