Esempio n. 1
0
        /// <summary>
        /// Constructor for creating a new Node object.
        /// </summary>
        /// <param name="nodeName">This is the friendly name that is used by applications to describe the object.</param>
        /// <param name="nodeID">The globally unique identifier for this object.</param>
        /// <param name="nodeType">The type of derived object to construct when deserializing the object.</param>
        public Node(string nodeName, string nodeID, string nodeType)
        {
            name = nodeName;
            id   = nodeID.ToLower();
            type = nodeType;

            // Create a new PropertyList object.
            properties = new PropertyList(name, id, type);

            // Set the object type(s) in the properties.
            properties.AddNodeProperty(PropertyTags.Types, nodeType);
            if (nodeType != NodeTypes.NodeType)
            {
                properties.AddNodeProperty(PropertyTags.Types, NodeTypes.NodeType);
            }
        }