private void UpdateSponsorItemLogo(SponsorItem sponsorItem, SponsorModel sponsorModel) { foreach (var sponsorLogo in _sponsorLogoData.SponsorLogos) { if (!string.Equals(sponsorModel.Name, sponsorLogo.Name)) { continue; } sponsorItem.SetSponsorLogo(sponsorLogo); return; } }
private void FindSponsorModelGroup(SponsorModel sponsorModel) { foreach (var sponsorGroup in _sponsorGroups) { var sponsorKeys = sponsorGroup.SponsorKeys; var sponsorModels = sponsorGroup.SponsorModels; if (sponsorKeys.Contains(sponsorModel.Id)) { sponsorModels.Add(sponsorModel); return; } } }
//--------------------------------------------------------------------- // Public //--------------------------------------------------------------------- public void SetSponsorModel(SponsorModel sponsorModel) { _sponsorName.text = sponsorModel.Name; SponsorModel = sponsorModel; }