Exemplo n.º 1
0
        private static bool CullDisassociatedProperties(ObservableCollectionWorkaround <PropertyEntry> propertyList)
        {
            bool propertiesCulled = false;

            for (int i = propertyList.Count - 1; i >= 0; i--)
            {
                ModelPropertyEntry property = (ModelPropertyEntry)propertyList[i];
                if (property.Disassociated)
                {
                    property.Disconnect();
                    propertyList.RemoveAt(i);
                    propertiesCulled = true;
                }
            }

            return(propertiesCulled);
        }