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

📄 contextinformation.cs

📁 YetAnotherForum.Net+ScrewTurnWiki中文完美汉化增强版
💻 CS
字号:

using System;
using System.Collections.Generic;
using System.Text;
using System.Web;

namespace ScrewTurn.Wiki.PluginFramework {

	/// <summary>
	/// Contains information about the Context of the page formatting.
	/// </summary>
	public class ContextInformation {

		private PageInfo page;
		private string language;
		private HttpContext httpContext;
		private string username;
		private bool userIsAdmin;

		/// <summary>
		/// Initializes a new instance of the <b>FormatContext</b> class.
		/// </summary>
		/// <param name="page">The Page Information, if any, <b>null</b> otherwise.</param>
		/// <param name="language">The current Thread's language (for example "en-US").</param>
		/// <param name="httpContext">The current HTTP Context object.</param>
		/// <param name="username">The current User's Username (or <b>null</b>).</param>
		/// <param name="userIsAdmin">A value specifying whether or not the current User is an Administrator.</param>
		public ContextInformation(PageInfo page, string language, HttpContext httpContext, string username, bool userIsAdmin) {
			this.page = page;
			this.language = language;
			this.httpContext = httpContext;
			this.username = username;
			this.userIsAdmin = userIsAdmin;
		}

		/// <summary>
		/// Gets the Page Information.
		/// </summary>
		public PageInfo Page {
			get { return page; }
		}

		/// <summary>
		/// Gets the current Thread's Language (for example en-US).
		/// </summary>
		public string Language {
			get { return language; }
		}

		/// <summary>
		/// Gets the current HTTP Context object.
		/// </summary>
		public HttpContext HttpContext {
			get { return httpContext; }
		}

		/// <summary>
		/// Gets the Username of the current User (or <b>null</b>).
		/// </summary>
		/// <remarks>If the Username is not available, the return value is <b>null</b>.</remarks>
		public string Username {
			get { return username; }
		}

		/// <summary>
		/// Gets a value specifying whether or not the current User (if any) is an Administrator.
		/// </summary>
		public bool UserIsAdmin {
			get { return userIsAdmin; }
		}

	}

}

⌨️ 快捷键说明

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