public void Delete(SPNavigationNodeInstance node)
        {
            if (node == null)
            {
                throw new JavaScriptException(Engine, "Error", "node must be specified.");
            }

            m_navigationNodeCollection.Delete(node.SPNavigationNode);
        }
        public SPNavigationNodeInstance AddAsLast(SPNavigationNodeInstance node)
        {
            if (node == null)
            {
                throw new JavaScriptException(Engine, "Error", "node must be specified.");
            }

            var result = m_navigationNodeCollection.AddAsLast(node.SPNavigationNode);

            return(result == null
                ? null
                : new SPNavigationNodeInstance(Engine.Object.InstancePrototype, result));
        }
Example #3
0
        public void Move(SPNavigationNodeCollectionInstance collection, SPNavigationNodeInstance previousSibling)
        {
            if (collection == null)
            {
                throw new JavaScriptException(this.Engine, "Error", "SPNavigationNodeCollection must be specified.");
            }

            if (previousSibling == null)
            {
                throw new JavaScriptException(this.Engine, "Error", "previousSibling must be specified.");
            }

            m_navigationNode.Move(collection.SPNavigationNodeCollection, previousSibling.SPNavigationNode);
        }
        public SPNavigationNodeInstance AddToQuickLaunch(SPNavigationNodeInstance node, string heading)
        {
            if (node == null)
            {
                throw new JavaScriptException(this.Engine, "Error", "node must be specified.");
            }

            SPQuickLaunchHeading qlHeading;

            if (!heading.TryParseEnum(true, out qlHeading))
            {
                throw new JavaScriptException(this.Engine, "Error", "SPQuickLaunchHeading must be specified.");
            }

            var result = m_navigation.AddToQuickLaunch(node.SPNavigationNode, qlHeading);

            return(result == null
                ? null
                : new SPNavigationNodeInstance(this.Engine.Object.InstancePrototype, result));
        }