⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 book.cs

📁 本系统是在asp版《在线文件管理器》的基础上设计制作
💻 CS
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using CommunityServer.Components;

namespace CommunityServer.GuestBooks.Components
{
	/// <summary>
	/// Summary description for GuestBook.
	/// </summary>
	public class Book : Section
	{
		public Book()
		{
			this.ApplicationType = ApplicationType.GuestBook;
		}

		#region Private/Internal

		AccessCheckDelegate acd = null;
		ValidatePermissionsDelegate vpd = null;
		GuestBookPermission op = null;

		#endregion

		
		public override PermissionBase OwnerPermission
		{
			get
			{
				if(op == null)
				{
					op = new GuestBookPermission();
					op.SetBit(Permission.Post,AccessControlEntry.Allow);
					op.SetBit(Permission.Reply,AccessControlEntry.Allow);
					op.SetBit(Permission.View,AccessControlEntry.Allow);
				}
				return op;
			}
		}


		/// <summary>
		/// Each section type must return it's permission type
		/// </summary>
		public override PermissionBase DefaultRolePermission
		{
			get { return new GuestBookPermission(); }
		}

		/// <summary>
		/// Provides the Method implementing the AccessCheckDelegate signature
		/// </summary>
		public override AccessCheckDelegate AccessCheck
		{
			get
			{
				if(acd == null)
					acd = new AccessCheckDelegate(GuestBookPermission.AccessCheck);

				return acd;
			}
		}

		/// <summary>
		/// Provides the Method implementing the ValidateDelegate signature
		/// </summary>
		public override ValidatePermissionsDelegate ValidatePermissions
		{
			get
			{
				if(vpd == null)
					vpd = new ValidatePermissionsDelegate(GuestBookPermission.Validate);

				return vpd;
			}
		}
	}
}

⌨️ 快捷键说明

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