public MarkerBasedSceneNodeCollection <T> FilterOutDeletedMarkers()
 {
     for (int index = 0; index < this.markers.Count; ++index)
     {
         if (this.markers.MarkerAt(index).IsDeleted)
         {
             MarkerBasedSceneNodeCollection <T> sceneNodeCollection = new MarkerBasedSceneNodeCollection <T>(this.viewModel, this.markers);
             sceneNodeCollection.markers.CullDeletedMarkers();
             return(sceneNodeCollection);
         }
     }
     return((MarkerBasedSceneNodeCollection <T>)null);
 }
        public MarkerBasedSceneNodeCollection(SceneViewModel viewModel, ICollection <T> otherList)
        {
            this.viewModel = viewModel;
            MarkerBasedSceneNodeCollection <T> sceneNodeCollection = otherList as MarkerBasedSceneNodeCollection <T>;

            if (sceneNodeCollection != null)
            {
                this.markers = new DocumentNodeMarkerSortedListOf <DocumentNode>(sceneNodeCollection.markers);
            }
            else
            {
                this.markers = new DocumentNodeMarkerSortedListOf <DocumentNode>();
                foreach (T node in (IEnumerable <T>)otherList)
                {
                    if ((object)node != null && this.IsElementValid(node))
                    {
                        this.markers.Add(node.DocumentNode.Marker, node.DocumentNode);
                    }
                }
            }
        }