Example #1
0
        /// <summary>
        /// 获取当前类型分类的新实例。
        /// </summary>
        /// <param name="parent">上级分类。</param>
        /// <returns>当前类型分类的新实例。</returns>
        public Classify CreateClassify(Classify parent)
        {
            System.Reflection.ConstructorInfo ci = this.Type.GetConstructor(new System.Type[] { });
            object objInstance = ci.Invoke(new object[] { });

            Classify classify = objInstance as Classify;

            classify.SetApplication(this.m_Application);
            classify.ClassifyType = this;
            classify.SetParent(parent);
            return(classify);
        }
Example #2
0
            internal void Add(Classify item)
            {
                if (this.m_Children != null)
                {
                    item.SetParent(this.m_Parent);
                    this.m_Children.Add(item);
                }

                if (this.m_Count > -1)
                {
                    this.m_Count++;
                }
            }