Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ReadOnlyBrowsingListNodeIndex"/> class.
        /// </summary>
        /// <param name="parentNode">Node containing the list.</param>
        /// <param name="node">Indexed node in the list</param>
        /// <param name="propertyName">Property in <paramref name="parentNode"/> corresponding to the list.</param>
        /// <param name="index">Position of the node in the list.</param>
        public ReadOnlyBrowsingListNodeIndex(Node parentNode, Node node, string propertyName, int index)
            : base(node, propertyName)
        {
            Contract.RequireNotNull(parentNode, out Node ParentNode);
            Debug.Assert(index >= 0);
            Debug.Assert(NodeTreeHelperList.IsListChildNode(ParentNode, propertyName, index, node));

            this.ParentNode = ParentNode;
            Index           = index;
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ReadOnlyBrowsingListNodeIndex"/> class.
        /// </summary>
        /// <param name="parentNode">Node containing the list.</param>
        /// <param name="node">Indexed node in the list</param>
        /// <param name="propertyName">Property in <paramref name="parentNode"/> corresponding to the list.</param>
        /// <param name="index">Position of the node in the list.</param>
        public ReadOnlyBrowsingListNodeIndex(INode parentNode, INode node, string propertyName, int index)
            : base(node, propertyName)
        {
            Debug.Assert(parentNode != null);
            Debug.Assert(index >= 0);
            Debug.Assert(NodeTreeHelperList.IsListChildNode(parentNode, propertyName, index, node));

            ParentNode = parentNode;
            Index      = index;
        }