commentextensionfamily.cs

来自「该项目中对 SQLHelper 类进行了简单封装」· CS 代码 · 共 70 行

CS
70
字号
/* 
 * CommentExtensionFamily.cs @Microsoft Visual Studio 2005 <.NET Framework 2.0>
 * AfritXia
 * 2007-12-06
 * 
 * Copyright(c) http://www.AfritXia.NET/
 * 
 */

using System;
using System.Collections.Generic;

using NET.AfritXia.MyHome.Extension.Definition;
using NET.AfritXia.MyHome.Model.Message;

namespace NET.AfritXia.MyHome.Extension.Families
{
	/// <summary>
	/// 评论扩展家族类
	/// </summary>
	internal class CommentExtensionFamily : ExtensionFamilyBase<ICommentExtension>, ICommentExtension
	{
		#region 类构造器
		/// <summary>
		/// 类默认构造器
		/// </summary>
		internal CommentExtensionFamily()
		{
		}
		#endregion

		#region ICommentExtension 成员
		public void OnPreAppend(Comment newComment)
		{
			foreach (ICommentExtension e in this.InnerExtensionList)
				e.OnPreAppend(newComment);
		}

		public void OnAppendComplete(Comment newComment)
		{
			foreach (ICommentExtension e in this.InnerExtensionList)
				e.OnAppendComplete(newComment);
		}

		public void OnPreDelete(Comment delComment)
		{
			foreach (ICommentExtension e in this.InnerExtensionList)
				e.OnPreDelete(delComment);
		}

		public void OnDeleteComplete(Comment delComment)
		{
			foreach (ICommentExtension e in this.InnerExtensionList)
				e.OnDeleteComplete(delComment);
		}

		public void OnPreViewCommentList(int belongToArticleID)
		{
			foreach (ICommentExtension e in this.InnerExtensionList)
				e.OnPreViewCommentList(belongToArticleID);
		}

		public void OnViewCommentListComplete(int belongToArticleID, IList<Comment> viewCommentList)
		{
			foreach (ICommentExtension e in this.InnerExtensionList)
				e.OnViewCommentListComplete(belongToArticleID, viewCommentList);
		}
		#endregion
	}
}

⌨️ 快捷键说明

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