Esempio n. 1
0
        public static void RemoveNode(this PinBookmark mark, ITreeNode node)
        {
            if (mark == null)
            {
                throw new ArgumentNullException("mark is null");
            }
            if (node == null)
            {
                throw new ArgumentNullException("Node is null");
            }

            foreach (var currentNode in mark.Nodes)
            {
                if (node.FullName == currentNode.FullName)
                {
                    mark.Nodes.Remove(currentNode);
                    return;
                }
            }
        }
Esempio n. 2
0
        public static bool ContainsNode(this PinBookmark mark, ITreeNode node)
        {
            if (mark == null)
            {
                throw new ArgumentNullException("mark is null");
            }
            if (node == null)
            {
                throw new ArgumentNullException("Node is null");
            }

            foreach (var currentNode in mark.Nodes)
            {
                if (node.FullName == currentNode.FullName)
                {
                    return(true);
                }
            }

            return(false);
        }