示例#1
0
        /// <summary>
        /// Ends the current category.
        /// </summary>
        /// <remarks>
        /// If the current category has a parent category, the parent category is made the current category.
        /// </remarks>
        /// <exception cref="InvalidOperationException">when there is no current category.</exception>
        /// <exception cref="InvalidOperationException">when there is an unfinished policy being built.</exception>
        public void EndCategory()
        {
            CheckCurrentCategory();
            CheckNoStartedPolicy();

            AdmCategory currentCategory = categoriesStack.Pop();

            if (categoriesStack.Count == 0)
            {
                content.AddCategory(currentCategory);
            }
            else
            {
                categoriesStack.Peek().AddCategory(currentCategory);
            }
        }
示例#2
0
 internal void AddCategory(AdmCategory category)
 {
     categories.Add(category);
 }
 /// <summary>
 /// Add a category to the content
 /// </summary>
 /// <param name="category">The category to add.</param>
 public void AddCategory(AdmCategory category)
 {
     categories.Add(category);
 }
示例#4
0
		internal void AddCategory(AdmCategory category)
		{
			this.categories.Add(category);
		}
示例#5
0
 /// <summary>
 /// Add a category to the content
 /// </summary>
 /// <param name="category">The category to add.</param>
 public void AddCategory(AdmCategory category)
 {
     categories.Add(category);
 }