1 // Copyright 2004-2007 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
.Filters
17 using Castle
.MonoRail
.Framework
.Attributes
;
20 /// Persist entire flash content after an action execution on the controller.
21 /// <seealso cref="PersistFlashAttribute"/>
23 public class PersistFlashFilter
: IFilter
26 /// Implementors should perform they filter logic and
27 /// return <c>true</c> if the action should be processed.
29 /// <param name="exec">When this filter is being invoked</param>
30 /// <param name="context">Current context</param>
31 /// <param name="controller">The controller instance</param>
33 /// <c>true</c> if the action
34 /// should be invoked, otherwise <c>false</c>
36 public bool Perform(ExecuteEnum exec
, IRailsEngineContext context
, IController controller
)
38 controller
.Flash
.Keep();