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; } }
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)); }
public void CopyTo(IPhones targetPhones) { IPhonesLogic.Copy(this, targetPhones); }
public IndexController(IPhones iPhones) { _phones = iPhones; }