1
// Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.MonoRail
.Framework
17 using System
.Collections
;
18 using System
.Collections
.Generic
;
19 using Castle
.MonoRail
.Framework
.Resources
;
26 public interface IControllerContext
29 /// Gets or sets the custom action parameters.
31 /// <value>The custom action parameters.</value>
32 IDictionary
<string, object> CustomActionParameters { get; set; }
35 /// Gets the property bag, which is used
36 /// to pass variables to the view.
38 IDictionary PropertyBag { get; set; }
41 /// Gets a dictionary of name/helper instance
43 /// <value>The helpers.</value>
44 HelperDictionary Helpers { get; set; }
47 /// Gets the controller's name.
49 string Name { get; set; }
52 /// Gets the controller's area name.
54 string AreaName { get; set; }
57 /// Gets or set the layout being used.
59 string[] LayoutNames { get; set; }
62 /// Gets the name of the action being processed.
64 string Action { get; set; }
67 /// Gets or sets the view which will be rendered after this action executes.
69 string SelectedViewName { get; set; }
72 /// Gets the view folder -- (areaname +
73 /// controllername) or just controller name -- that this controller
74 /// will use by default.
76 string ViewFolder { get; set; }
79 /// Gets a dicitionary of name/<see cref="IResource"/>
81 /// <remarks>It is supposed to be used by MonoRail infrastructure only</remarks>
82 /// <value>The resources.</value>
83 IDictionary
<string, IResource
> Resources { get; }
86 /// Gets the dynamic actions.
88 /// <value>The dynamic actions.</value>
89 IDictionary
<string, IDynamicAction
> DynamicActions { get; }
92 /// Gets or sets the controller descriptor.
94 /// <value>The controller descriptor.</value>
95 ControllerMetaDescriptor ControllerDescriptor { get; set; }
98 /// Gets or sets the route match.
100 /// <value>The route match.</value>
101 RouteMatch RouteMatch { get; set; }