Esempio n. 1
0
        internal void UpdateSelf()
        {
            if (!IsDirectory)
            {
                return;
            }
            ChildrenInitialized = false;

            foreach (var child in ChildDirectoryNodes)
            {
                child.Dispose();
            }
            ChildDirectoryNodes.Clear();

            foreach (var child in ChildFileNodes)
            {
                child.Dispose();
            }
            ChildFileNodes.Clear();

            LoadChildren();
        }
Esempio n. 2
0
        internal void DisposeObservableCollections()
        {
            if (ChildDirectoryNodes != null)
            {
                foreach (var child in ChildDirectoryNodes)
                {
                    child.Dispose();
                }
                try {
                    ChildDirectoryNodes.Clear();
                } catch (NotSupportedException) { }
            }

            if (ChildFileNodes != null)
            {
                foreach (var child in ChildFileNodes)
                {
                    child.Dispose();
                }
                try {
                    ChildFileNodes.Clear();
                } catch (NotSupportedException) { }
            }
        }