Castle.MonoRail.Framework.ControllerLifecycleExecutor.InitializeController C# (CSharp) Method

InitializeController() public method

Should bring the controller to an usable state by populating its fields with values that represent the current request
public InitializeController ( string areaName, string controllerName, string actionName ) : void
areaName string The area name
controllerName string The controller name
actionName string The action name
return void
		public void InitializeController(string areaName, string controllerName, string actionName)
		{
			controller.InitializeControllerState(areaName, controllerName, actionName);
			InitializeControllerFieldsFromServiceProvider();
			controller.LayoutName = ObtainDefaultLayoutName();
			CreateAndInitializeHelpers();
			CreateFiltersDescriptors();
			ProcessScaffoldIfPresent();
			ActionProviderUtil.RegisterActions(controller);

			// Record the action
			controller.SetEvaluatedAction(actionName);

			// Record the default view for this area/controller/action
			controller.RenderView(actionName);

			// If we have an HttpContext available, store the original view name
			if (controller.HttpContext != null)
			{
				if (!controller.HttpContext.Items.Contains(Constants.OriginalViewKey))
				{
					controller.HttpContext.Items[Constants.OriginalViewKey] = controller._selectedViewName;
				}
			}

			context.CurrentController = controller;
		}