weblogcategoryrsswriter.cs

来自「本系统是在asp版《在线文件管理器》的基础上设计制作」· CS 代码 · 共 56 行

CS
56
字号
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System.Collections;using CommunityServer.Components;namespace CommunityServer.Blogs.Components
{
    /// <summary>
    /// Generates an XML feed by a specific category
    /// </summary>
    public class WeblogCategoryRssWriter : WeblogRssWriter
    {
        public WeblogCategoryRssWriter(ArrayList posts, Weblog w, string baseUrl, PostCategory category):base(posts,w, baseUrl)
        {
            Category = category;
        }

        /// <summary>
        /// Appends the CategoryName to Title element
        /// </summary>
        protected override string Title
        {
            get
            {
                return base.Title + " : " + Category.Name;
            }
        }


        protected PostCategory Category = null;

        protected override bool AllowComments
        {
            get
            {
                return base.AllowComments && CurrentWeblog.EnableComments;
            }
        }

        protected override void WriteChannel()
        {
            BuildChannel(BlogUrls.Instance().IndividualCategoryPage(CurrentSection.ApplicationKey,Category.CategoryType,Category.CategoryID),Category.Description, CurrentWeblog.Langugage);
        }


        


    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?