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