internal void SetProfile(string Type, string PlatformID, string ProductCode, string PhoneFirmware, string FfuFirmware, UInt32 FillSize, UInt32 HeaderSize, bool AssumeImageHeaderFallsInGap, bool AllocateAsyncBuffersOnPhone) { FlashProfile Profile = GetProfile(PlatformID, PhoneFirmware, FfuFirmware); if (Profile == null) { Profile = new FlashProfile(); Profile.Type = Type; Profile.PlatformID = PlatformID; Profile.ProductCode = ProductCode; Profile.PhoneFirmware = PhoneFirmware; Profile.FfuFirmware = FfuFirmware; FlashProfiles.Add(Profile); } Profile.FillSize = FillSize; Profile.HeaderSize = HeaderSize; Profile.AssumeImageHeaderFallsInGap = AssumeImageHeaderFallsInGap; Profile.AllocateAsyncBuffersOnPhone = AllocateAsyncBuffersOnPhone; WriteConfig(); }
internal FlashProfile GetProfile(string PlatformID, string PhoneFirmware, string FfuFirmware = null) { return(FlashProfiles.Where(p => ((string.Compare(p.PlatformID, PlatformID, true) == 0) && (string.Compare(p.PhoneFirmware, PhoneFirmware, true) == 0) && ((FfuFirmware == null) || (string.Compare(p.FfuFirmware, FfuFirmware, true) == 0)))).FirstOrDefault()); }