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
21 /// Core engine. Performs the base work or the
22 /// framework, processing the URL and dispatching
23 /// the execution to the controller.
26 /// This is were all fun begins.
28 [Obsolete("This class is no longer used, use MonoRailHttpHandler.CurrentContext")]
29 public class ProcessEngine
32 /// Returns the MonoRail context assosciated with the current
33 /// request if one is available, otherwise <c>null</c>.
35 [Obsolete("Use MonoRailHttpHandler.CurrentContext instead")]
36 public static IRailsEngineContext CurrentContext
40 HttpContext context
= HttpContext
.Current
;
42 // Are we in a web request?
43 if (context
== null) return null;
45 return EngineContextModule
.ObtainRailsEngineContext(context
);