bool HasAnyTags(AssetEntryRecordCandidate candidate) { FixedHashSet <string> candidateTags = candidate.TagsDictionary.GetValue(this.Id); if (candidateTags.IsNull) { return(false); } return(candidateTags.Count > 0); }
bool HasTag(AssetEntryRecordCandidate candidate, BranchTagCondition condition) { FixedHashSet <string> candidateTags = candidate.TagsDictionary.GetValue(this.Id); if (candidateTags.IsNull) { return(false); } if (condition.Tag.IsNullOrEmpty()) { return(candidateTags.Count <= 0); } return(candidateTags.Contains(condition.Tag)); }
int GetStep(AssetEntryRecordCandidate candidate) { int step = int.MaxValue / 2; FixedHashSet <string> candidateTags = candidate.TagsDictionary.GetValue(this.Id); if (candidateTags.IsNull) { return(step); } foreach (var tag in candidateTags) { StepTagCondition condition = conditionDictionary.GetValue(tag); if (condition != null) { step = Mathf.Min(step, condition.Step); } } return(step); }
int GetForefrontCanvasIndex(IReadOnlyList <IBackgroundUiCanvas> uiCanvasList, FixedHashSet <IBackgroundUiCanvas> entried) { for (int i = uiCanvasList.Count - 1; i >= 0; i--) { if (entried.Contains(uiCanvasList[i])) { return(i); } } return(-1); }
public AssetEntryRecordCandidate(AssetEntryRecord assetEntryRecord, IEnumerable <string> tags) { this.AssetEntryRecord = assetEntryRecord; this.tags = new FixedHashSet <string>(tags.Distinct()); }