private Set<int> FindCorrespondingItemsInCurrentList(IDictionary<int, object> itemAndListSourceTokenPairs, PartOwnershipTree pot) { // create a reverse index of classes to a list of items IDictionary<int, Set<int>> sourceFlidsToItems = MapSourceFlidsToItems(itemAndListSourceTokenPairs); Set<int> relativesInCurrentList = new Set<int>(); foreach (KeyValuePair<int, Set<int>> sourceFlidToItems in sourceFlidsToItems) { Set<int> commonAncestors; relativesInCurrentList.AddRange(pot.FindCorrespondingItemsInCurrentList(sourceFlidToItems.Key, sourceFlidToItems.Value, m_flid, out commonAncestors)); } return relativesInCurrentList; }
/// <summary> /// this list can work with multiple properties to load its list (e.g. Entries or AllSenses). /// </summary> /// <param name="cache"></param> /// <param name="mediator"></param> /// <param name="recordListNode"></param> public override void Init(FdoCache cache, XCore.Mediator mediator, XmlNode recordListNode) { CheckDisposed(); // suspend loading the property until given a class by RecordBrowseView via // RecordClerk.OnChangeListItemsClass(); m_suspendReloadUntilOnChangeListItemsClass = true; m_configuration = recordListNode; BaseInit(cache, mediator, recordListNode); bool analysis = XmlUtils.GetOptionalBooleanAttributeValue(recordListNode, "analysisWs", false); // used for finding first relative of corresponding current object m_pot = PartOwnershipTree.Create(cache, this, true); GetDefaultFontNameAndSize(analysis, cache, mediator, out m_fontName, out m_typeSize); string owner = XmlUtils.GetOptionalAttributeValue(recordListNode, "owner"); // by default we'll setup for Entries GetTargetFieldInfo(LexEntry.kclsidLexEntry, owner, out m_owningObject, out m_flid, out m_propertyName); }