| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- //
- // System.Web.Configuration.HandlerItem
- //
- // Author:
- // Patrik Torstensson ([email protected])
- //
- using System;
- namespace System.Web.Configuration {
- public class HandlerItem {
- private Type _type;
- private string _typeName;
- private string _path;
- private string _requestType;
- public HandlerItem(string requestType, string path, string type) {
- _typeName = type;
- _path = path;
- _requestType = requestType.Replace(" ", "");
- _type = Type.GetType(type, true);
- if (!typeof(IHttpHandler).IsAssignableFrom(_type)) {
- if (!typeof(IHttpHandlerFactory).IsAssignableFrom(_type)) {
- throw new HttpException(HttpRuntime.FormatResourceString("type_not_factory_or_handler"));
- }
- }
- }
- public object Create() {
- return HttpRuntime.CreateInternalObject(_type);
- }
- public Type Type {
- get {
- return _type;
- }
- }
- [MonoTODO()]
- public bool IsMatch(string type, string path) {
- // Debugging
- return true;
- }
- }
- }
|