Esempio n. 1
0
        private IPhFeatureConstraint RemoveFeatureConstraint(ILcmReferenceSequence <IPhFeatureConstraint> featConstrs, IFsFeatDefn feat)
        {
            var constrToRemove = GetFeatureConstraint(featConstrs, feat);

            if (constrToRemove != null)
            {
                featConstrs.Remove(constrToRemove);
            }
            return(constrToRemove);
        }
        /// <summary>
        /// Remove either the given entry or any sense owned by that entry from the list.
        /// </summary>
        private static void RemoveEntryFromList(ILcmReferenceSequence <ICmObject> list, ILexEntry entry)
        {
            var objsToRemove = new List <ICmObject>();

            foreach (var item in list)
            {
                if ((item as ILexEntry) == entry)
                {
                    objsToRemove.Add(item);
                }
                else if (item is ILexSense && item.OwnerOfClass <ILexEntry>() == entry)
                {
                    objsToRemove.Add(item);
                }
            }
            foreach (var item in objsToRemove)
            {
                list.Remove(item);
            }
        }