icontextinitializer.cs
来自「AJAX开发工具包」· CS 代码 · 共 41 行
CS
41 行
using System;
using System.Web;
namespace AjaxPro
{
/// <summary>
/// Defines a method that will initialize the context for the use in AJAX methods.
/// </summary>
/// <example>
/// using System;
/// using AjaxPro;
///
/// namespace Demo
/// {
/// public class AjaxMethods : IContextInitializer
/// {
/// private HttpContext context = null;
///
/// public void InitializeContext(HttpContext context)
/// {
/// this.context = context;
/// }
///
/// [AjaxMethod]
/// public string GetRootPath()
/// {
/// return context.Server.MapPath("~");
/// }
/// }
/// }
/// </example>
public interface IContextInitializer
{
/// <summary>
/// Initialize the HttpContext to the class implementing IContextInitializer.
/// </summary>
/// <param name="context">The HttpContext.</param>
void InitializeContext(HttpContext context);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?