本文整理汇总了C#中Castle.MonoRail.Framework.Controller.CreateStandardHelpers方法的典型用法代码示例。如果您正苦于以下问题:C# Controller.CreateStandardHelpers方法的具体用法?C# Controller.CreateStandardHelpers怎么用?C# Controller.CreateStandardHelpers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Castle.MonoRail.Framework.Controller
的用法示例。
在下文中一共展示了Controller.CreateStandardHelpers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrepareController
/// <summary>
/// Prepares the controller giving it mock implementations
/// of the service it requires to function normally.
/// </summary>
/// <param name="controller">The controller.</param>
/// <param name="areaName">Name of the area (cannot be null).</param>
/// <param name="controllerName">Name of the controller.</param>
/// <param name="actionName">Name of the action.</param>
/// <param name="contextInitializer">The context initializer.</param>
protected void PrepareController(Controller controller, string areaName, string controllerName, string actionName, ContextInitializer contextInitializer)
{
if (controller == null)
{
throw new ArgumentNullException("controller", "'controller' cannot be null");
}
if (areaName == null)
{
throw new ArgumentNullException("areaName");
}
if (controllerName == null)
{
throw new ArgumentNullException("controllerName");
}
if (actionName == null)
{
throw new ArgumentNullException("actionName");
}
cookies = new Dictionary<string, HttpCookie>(StringComparer.InvariantCultureIgnoreCase);
BuildEngineContext(areaName, controllerName, actionName, contextInitializer);
controllerContext = services.ControllerContextFactory.Create(areaName, controllerName, actionName, services.ControllerDescriptorProvider.BuildDescriptor(controller));
controller.Contextualize(Context, controllerContext);
controller.CreateStandardHelpers();
controller.Initialize();
}