Added non-generic registration interface to IKernel and IWindsor to accommodate dynam...
[castle.git] / MonoRail / Castle.MonoRail.Framework / DynamicActionExecutor.cs
blob2a80e8a639ca86273e31a615cc2f4a8c0a806ebc
1 // Copyright 2004-2007 Castle Project - http://www.castleproject.org/
2 //
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
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
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;
18 using Descriptors;
20 /// <summary>
21 /// Pendent
22 /// </summary>
23 public class DynamicActionExecutor : IExecutableAction
25 private readonly IDynamicAction action;
27 /// <summary>
28 /// Initializes a new instance of the <see cref="DynamicActionExecutor"/> class.
29 /// </summary>
30 /// <param name="action">The action.</param>
31 public DynamicActionExecutor(IDynamicAction action)
33 this.action = action;
36 /// <summary>
37 /// Gets a value indicating whether no filter should run before execute the action.
38 /// </summary>
39 /// <value><c>true</c> if they should be skipped; otherwise, <c>false</c>.</value>
40 public bool ShouldSkipAllFilters
42 get { return false; }
45 /// <summary>
46 /// Indicates that no rescues whatsoever should be applied to this action.
47 /// </summary>
48 /// <value></value>
49 /// <returns></returns>
50 public bool ShouldSkipRescues
52 get { return false; }
55 /// <summary>
56 /// Gets a rescue descriptor for the exception type.
57 /// </summary>
58 /// <param name="exceptionType">Type of the exception.</param>
59 /// <returns></returns>
60 public RescueDescriptor GetRescueFor(Type exceptionType)
62 return null;
65 /// <summary>
66 /// Gets the layout override.
67 /// </summary>
68 /// <value>The layout override.</value>
69 public string[] LayoutOverride
71 get { return null; }
74 /// <summary>
75 /// Pendent
76 /// </summary>
77 /// <param name="filterType">Type of the filter.</param>
78 /// <returns></returns>
79 public bool ShouldSkipFilter(Type filterType)
81 return false;
84 /// <summary>
85 /// Gets the http method that the action requires before being executed.
86 /// </summary>
87 /// <value>The accessible through verb.</value>
88 public Verb AccessibleThroughVerb
90 get { return Verb.Undefined; }
93 /// <summary>
94 /// Gets the i18n related resource descriptors.
95 /// </summary>
96 /// <value>The resources.</value>
97 public ResourceDescriptor[] Resources
99 get { return new ResourceDescriptor[0]; }
102 /// <summary>
103 /// Gets the cache policy configurer.
104 /// </summary>
105 /// <value>The cache policy configurer.</value>
106 public ICachePolicyConfigurer CachePolicyConfigurer
108 get { return null; }
111 /// <summary>
112 /// Executes the action this instance represents.
113 /// </summary>
114 /// <param name="engineContext">The engine context.</param>
115 /// <param name="controller">The controller.</param>
116 /// <param name="context">The context.</param>
117 public object Execute(IEngineContext engineContext, Controller controller, IControllerContext context)
119 return action.Execute(engineContext, controller, context);