public void RemoveAndDestroyPattern(ObjectPlacementPathHeightPattern pathHeightPattern)
        {
            if (ContainsPattern(pathHeightPattern))
            {
                _pathHeightPatterns.RemoveEntity(pathHeightPattern);
                ObjectPlacementPathHeightPatternWasRemovedFromDatabaseMessage.SendToInterestedListeners(pathHeightPattern);

                UndoEx.DestroyObjectImmediate(pathHeightPattern);
            }
        }
        public void RemoveAndDestroyAllPatterns()
        {
            List <ObjectPlacementPathHeightPattern> patterns = GetAllPatterns();

            foreach (ObjectPlacementPathHeightPattern pattern in patterns)
            {
                _pathHeightPatterns.RemoveEntity(pattern);
                ObjectPlacementPathHeightPatternWasRemovedFromDatabaseMessage.SendToInterestedListeners(pattern);
            }

            foreach (ObjectPlacementPathHeightPattern pattern in patterns)
            {
                UndoEx.DestroyObjectImmediate(pattern);
            }
        }