Added non-generic registration interface to IKernel and IWindsor to accommodate dynam...
[castle.git] / MonoRail / Castle.MonoRail.Framework / IEngineContext.cs
blobb2a18002e9dc57fc388d5b9cac104432d5821d25
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.ComponentModel.Design;
19 using System.Web;
20 using System.Security.Principal;
21 using System.Collections;
22 using System.Collections.Specialized;
23 using Castle.Components.Binder;
25 /// <summary>
26 /// Represents an abstraction between the MonoRail API
27 /// and the ASP.Net API.
28 /// </summary>
29 public interface IEngineContext : IServiceContainer
31 /// <summary>
32 /// Returns an <see cref="IServerUtility"/>.
33 /// </summary>
34 IServerUtility Server { get; }
36 /// <summary>
37 /// Gets the underlying context of the API being used.
38 /// </summary>
39 HttpContext UnderlyingContext { get; }
41 /// <summary>
42 /// Gets a reference to the MonoRail services.
43 /// </summary>
44 /// <value>The services.</value>
45 IMonoRailServices Services { get; }
47 /// <summary>
48 /// Access the session objects.
49 /// </summary>
50 IDictionary Session { get; set; }
52 /// <summary>
53 /// Gets the request object.
54 /// </summary>
55 IRequest Request { get; }
57 /// <summary>
58 /// Gets the response object.
59 /// </summary>
60 IResponse Response { get; }
62 /// <summary>
63 /// Gets the trace object.
64 /// </summary>
65 ITrace Trace { get; }
67 /// <summary>
68 /// Access a dictionary of volative items.
69 /// </summary>
70 Flash Flash { get; set; }
72 // /// <summary>
73 // /// Transfer the execution to another resource.
74 // /// </summary>
75 // /// <param name="path"></param>
76 // /// <param name="preserveForm"></param>
77 // void Transfer( String path, bool preserveForm );
79 /// <summary>
80 /// Gets or sets the current user.
81 /// </summary>
82 IPrincipal CurrentUser { get; set; }
84 /// <summary>
85 /// Gets the last exception raised during
86 /// the execution of an action.
87 /// </summary>
88 Exception LastException { get; set; }
90 /// <summary>
91 /// Returns the application path.
92 /// </summary>
93 String ApplicationPath { get; }
95 // /// <summary>
96 // /// Returns the physical application path.
97 // /// </summary>
98 // String ApplicationPhysicalPath { get; }
100 /// <summary>
101 /// Returns the <see cref="UrlInfo"/> of the the current request.
102 /// </summary>
103 UrlInfo UrlInfo { get; }
105 /// <summary>
106 /// Returns the Items collection from the current HttpContext.
107 /// </summary>
108 IDictionary Items { get; }
110 /// <summary>
111 /// Gets or sets the current controller.
112 /// </summary>
113 /// <value>The current controller.</value>
114 IController CurrentController { get; set; }
116 /// <summary>
117 /// Gets or sets the current controller context.
118 /// </summary>
119 /// <value>The current controller context.</value>
120 IControllerContext CurrentControllerContext { get; set; }
123 // /// <summary>
124 // /// If a container is available for the app, this
125 // /// property exposes its instance.
126 // /// </summary>
127 // IServiceProvider Container { get; }
129 // /// <summary>
130 // /// Request a service from the engine context.
131 // /// </summary>
132 // /// <typeparam name="T">Service type</typeparam>
133 // /// <returns>Service instance</returns>
134 // T GetService<T>();