Beispiel #1
0
/// <summary>
/// Set the Owner and App of a child node from its parent
/// </summary>
/// <param name="owner"></param>

        public void SetChildOwnerAndApp(NodeMsx child)
        {
            if (child == null)
            {
                return;
            }

            child.SetOwner(this);
            child.SetApp(this.App);
            return;
        }
Beispiel #2
0
        /// <summary>
        /// Get ancestor node of the specified type
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>

        public T GetAncestor <T>() where T : NodeMsx
        {
            for (NodeMsx owner = this.Owner; owner != null; owner = owner.Owner)
            {
                T t = owner as T;
                if (t != null)
                {
                    return(t);
                }
            }
            return(default(T));
        }
Beispiel #3
0
        /// <summary>
        /// Adjust secondary references for each Mobius.SpotfireDocument.xxxMsx class
        /// Secondary references for all nodes include the parent node and root app node
        /// These also include references to other non-owned nodes
        /// including DataTableMsx, DataColumnMsx, VisualMsx, PageMsx ...
        /// Each class is responsible for providing a UpdatePostDeserializationSecondaryReferences method to
        /// update these for the class.
        /// </summary>
        /// <param name="child">The child node to be updated from this parent node</param>

        public void UpdatePostDeserializationSecondaryReferences(NodeMsx child)
        {
            if (child == null)
            {
                return;
            }

            child.Owner = this;             // link to parent

            child._app = this._app;         // link to top level analysis node

            child.UpdatePostDeserializationSecondaryReferences();

            return;
        }
Beispiel #4
0
        /// <summary>
        /// SetOwner
        /// </summary>
        /// <param name="app"></param>

        public void SetOwner(NodeMsx owner)
        {
            Owner = owner;
            return;
        }