Esempio n. 1
0
        protected override Variable Evaluate(ParsingScript script)
        {
            string deviceName = "";

#if __ANDROID__
            deviceName = Android.OS.Build.Brand;
            string model = Android.OS.Build.Model;
            if (!model.Contains("Android"))
            {
                // Simulators have "Android" in both, Brand and Model.
                deviceName += " " + model;
            }
#elif __IOS__
            deviceName = UtilsiOS.GetDeviceName();
#endif
            return(new Variable(deviceName));
        }
Esempio n. 2
0
        protected override Variable Evaluate(ParsingScript script)
        {
            string deviceName = "";

#if __ANDROID__
      deviceName   = Android.OS.Build.Brand;
      string model = Android.OS.Build.Model;
      if (!model.Contains("Android")) {
        // Simulators may have "Android" in both, Brand and Model.
        deviceName += " " + model;
      }
      deviceName = deviceName.Replace("google", "Simulator");
#elif __IOS__
            deviceName = UtilsiOS.GetDeviceName();
            deviceName = deviceName.Replace("Simulator", "iPhone");
#endif
            return new Variable(deviceName);
        }