blob: 4911ab8646f1aecc0e7a3657b5c54c91177fda03 (
plain)
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
|
//
// System.Web.UI.SimpleHandlerFactory
//
// Authors:
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
//
using System.Web;
namespace System.Web.UI
{
class SimpleHandlerFactory : IHttpHandlerFactory
{
public virtual IHttpHandler GetHandler (HttpContext context,
string requestType,
string virtualPath,
string path)
{
Type type = WebHandlerParser.GetCompiledType (context, virtualPath, path);
if (!(typeof (IHttpHandler).IsAssignableFrom (type)))
throw new HttpException ("Type does not implement IHttpHandler: " + type.FullName);
return Activator.CreateInstance (type) as IHttpHandler;
}
public virtual void ReleaseHandler (IHttpHandler handler)
{
}
}
}
|