/// <summary>
        /// Replaces a shared child in the address space.
        /// </summary>
        protected virtual BaseInstanceSource DeleteReplacedChild(BaseInstanceSource child)
        {  
            CheckNodeManagerState();

            // save reference and browse name info.
            NodeId referenceTypeId = child.ReferenceTypeId;
            QualifiedName browseName = child.BrowseName;

            // delete from the address space.
            child.Delete();

            // dispose it.
            child.Dispose();

            // add reference to shared child.
            NodeManager.ReferenceSharedNode(this, referenceTypeId, false, browseName);

            // remove reference.
            return null;
        }
        /// <summary>
        /// Creates the children for the node.
        /// </summary>
        protected virtual BaseInstanceSource DeleteChild(BaseInstanceSource child)
        {  
            // delete from the address space.
            child.Delete();

            // dispose it.
            child.Dispose();

            // remove reference.
            return null;
        }