コード例 #1
0
ファイル: Library.cs プロジェクト: alexbv16/LiveSPICE
        /// <summary>
        /// Find an immediate sub-category of the given Name.
        /// </summary>
        /// <param name="Name"></param>
        /// <returns></returns>
        public Category FindChild(string Name)
        {
            Category category = children.SingleOrDefault(i => i.Name == Name);
            if (category == null)
            {
                category = new Category() { Name = Name };
                children.Add(category);
            }

            return category;
        }