mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
* list: Modified file. * System.Web/HttpApplication.cs: fixed type and handle factories when creating IHttpHandler for a request. * System.Web.Configuration/HttpHandlersSectionHandler.cs: made a couple of static methods be part of a class used in other handlers. * System.Web.Configuration/HttpModulesConfigurationHandler.cs: handler for modules. * System.Web.Configuration/ModuleItem.cs: added IsMatch method. * System.Web.Configuration/ModulesConfiguration.cs: made it similar to the handlers class: added Clear, Remove. * System.Web.Handlers/ChangeLog: New file. * System.Web.Handlers/TraceHandler.cs: stubbed out. This should generate the trace page when tracing is enabled. * System.Web.SessionState/SessionStateModule.cs: don't throw exception. Just for testing the configuration stuff until we implement this. svn path=/trunk/mcs/; revision=8074
46 lines
859 B
C#
46 lines
859 B
C#
//
|
|
// System.Web.Configuration.ModuleItem
|
|
//
|
|
// Author:
|
|
// Patrik Torstensson ([email protected])
|
|
//
|
|
using System;
|
|
|
|
namespace System.Web.Configuration {
|
|
public class ModuleItem {
|
|
private Type _type;
|
|
private string _typeName;
|
|
private string _name;
|
|
|
|
public ModuleItem(string name, string type) {
|
|
_typeName = type;
|
|
_name = name;
|
|
|
|
_type = Type.GetType (type, true);
|
|
if (!typeof(IHttpModule).IsAssignableFrom(_type))
|
|
throw new HttpException(HttpRuntime.FormatResourceString("type_not_module"));
|
|
}
|
|
|
|
public IHttpModule Create() {
|
|
return (IHttpModule) HttpRuntime.CreateInternalObject(_type);
|
|
}
|
|
|
|
public Type Type {
|
|
get {
|
|
return _type;
|
|
}
|
|
}
|
|
|
|
public bool IsMatch (string name)
|
|
{
|
|
return (_type.Name == name || _type.FullName == name);
|
|
}
|
|
|
|
public string ModuleName {
|
|
get {
|
|
return _name;
|
|
}
|
|
}
|
|
}
|
|
}
|