コード例 #1
0
ファイル: PiggLeaf.cs プロジェクト: broxen/piggtools
 /// <summary>
 /// Initializes a directory node with the given parameters.
 /// </summary>
 /// <param name="Name">Name of the directory node.</param>
 /// <param name="Parent">Parent node of the directory.  If the node is a
 /// root node, Parent returns null.</param>
 /// <remarks>By default, Initialize sets all members to some reasonable
 /// default value, such as zero.  For the DateTime timestamp, it is set
 /// to the minimum DateTime available (midnight Jan. 1, 1 AD).  Non-
 /// default values should be set after the Initialize function is called.
 /// </remarks>
 private void Initialize(string Name, PiggNode Parent)
 {
     this.Name   = Name;
     this.Parent = Parent;
     Parent.AddLeaf(this);
     m_pigg_references = new List <PiggLeafInfo>();
 }
コード例 #2
0
        /// <summary>
        /// Adds a PiggLeaf object to the tree at the specified path.
        /// </summary>
        /// <param name="Leaf">Leaf to add to the PiggNode tree.</param>
        /// <param name="Path">Path to the PiggNode object to which the PiggLeaf
        /// should be added.</param>
        /// <returns>The PiggLeaf object added.</returns>
        public PiggLeaf AddLeaf(PiggLeaf Leaf, string Path)
        {
            PiggNode parent = this.AddPath(Path);

            return(parent.AddLeaf(Leaf));
        }