Пример #1
0
 public static void Copy(IPhones source, IPhones target)
 {
     if (source != null && target != null)
     {
         target.OtherPhone  = source.OtherPhone;
         target.MobilePhone = source.MobilePhone;
         target.OfficePhone = source.OfficePhone;
         target.HomePhone   = source.HomePhone;
         target.Fax         = source.Fax;
     }
 }
Пример #2
0
    private static void SetGen()
    {
        TextAsset jsonFile = Resources.Load <TextAsset>("Apple iPhones JSON");
        IPhones   devices  = JsonUtility.FromJson <IPhones>(jsonFile.text);

        for (int x = 0; x < devices.iphoneInfos.Length; x++)
        {
            if (devices.iphoneInfos[x].model == SystemInfo.deviceModel)
            {
                if (Enum.TryParse(devices.iphoneInfos[x].generation, out IphoneGeneration result))
                {
                    _Gen = result;
                    return;
                }
                else
                {
                    Debug.Log("Unable Parse Enum to Set Generation");
                }
            }
        }
        Debug.Log(string.Format("Device Model \"{0}\" not Recognised", SystemInfo.deviceModel));
    }
Пример #3
0
 public void CopyTo(IPhones targetPhones)
 {
     IPhonesLogic.Copy(this, targetPhones);
 }
Пример #4
0
 public IndexController(IPhones iPhones)
 {
     _phones = iPhones;
 }