private void Awake() { iChildModel = transform.parent.gameObject.GetComponent <IChildModel>(); if (iChildModel == null) { Debug.Log("IChildModel 인터페이스 추출 불가"); } }
public async Task <IParentModel> GetModelParentAsync(IChildModel model) { IParentModel parent = null; if (model.GameId > 0) { parent = (await GetGamesAsync()).FirstOrDefault(x => x.Id == model.GameId); } if (model.DeveloperId > 0) { parent = (await GetDevelopersAsync()).FirstOrDefault(x => x.Id == model.DeveloperId); } if (model.TopicId > 0) { parent = (await GetTopicsAsync()).FirstOrDefault(x => x.Id == model.TopicId); } if (parent == null) { throw new Exception("No parent!"); } return(parent); }
public Uri ParentFilesUrl(IChildModel childModel, bool absolute = false) { return(ParentFilesUrl(childModel.Parent, absolute)); }
public Uri ParentIconUrl(IChildModel child) { return(ParentIconUrl((dynamic)child.Parent)); }
public Uri ParentNewsUrl(IChildModel news, int?page = null, bool absolute = false) { return(ParentNewsUrl(news.Parent, page, absolute)); }