/
RubyMvcModule.cs
39 lines (34 loc) · 1.2 KB
/
RubyMvcModule.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System.Web.Mvc.IronRuby.Extensions;
namespace System.Web.Mvc.IronRuby.Core
{
public class RubyMvcModule : IHttpModule
{
#region Implementation of IHttpModule
/// <summary>
/// nitializes a module and prepares it to handle requests.
/// </summary>
/// <param name="context">
/// An <see cref="T:System.Web.HttpApplication" /> that provides access to the methods, properties, and events common to all application objects within an ASP.NET application
/// </param>
public void Init(HttpApplication context)
{
context.Error += context_Error;
}
void context_Error(object sender, EventArgs e)
{
var application = sender as RubyMvcApplication;
if(sender.IsNotNull())
{
application.Context.Error
}
}
/// <summary>
/// Disposes of the resources (other than memory) used by the module that implements <see cref="T:System.Web.IHttpModule" />.
/// </summary>
public void Dispose()
{
throw new System.NotImplementedException();
}
#endregion
}
}