public static IdentityList GetMatchIdentityListFromTipItems(ObservableCollection <TipItem> tipItems) { IdentityList ilMatches = new IdentityList(); foreach (TipItem t in tipItems) { ilMatches.AddUnique(t.Match.MatchID); } return(ilMatches); }
public LineObjectList <TaggedStringLn> SearchRelatedStrings(string sSearch, string sLanguage, IdentityList ilGroups, IdentityList ilCompetitors) { ilGroups.Clear(); ilCompetitors.Clear(); LineObjectList <TaggedStringLn> lResult = new LineObjectList <TaggedStringLn>(); SyncList <ObjectStringDictionary> lGroupStringDictionaries = m_diGroupStrings.ToSyncList(); foreach (ObjectStringDictionary di in lGroupStringDictionaries) { TaggedStringLn strFound = di.Search(sSearch, sLanguage); if (strFound != null) { Debug.Assert(strFound.RelationType == eObjectType.Group); Debug.Assert(strFound.ObjectId.Value != null); ilGroups.AddUnique(strFound.ObjectId.Value); } } SyncList <ObjectStringDictionary> lCompetitorStringDictionaries = m_diCompetitorStrings.ToSyncList(); foreach (ObjectStringDictionary di in lCompetitorStringDictionaries) { TaggedStringLn strFound = di.Search(sSearch, sLanguage); if (strFound != null) { Debug.Assert(strFound.RelationType == eObjectType.Competitor); Debug.Assert(strFound.ObjectId.Value != null); ilCompetitors.AddUnique(strFound.ObjectId.Value); } } return(lResult); }