mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 01:41:17 -10:00
* list: added SessionConfig.cs and SessionStateSectionHandler.cs * System.Web/HttpHelper.cs: store the values in an ArrayList to get them in correct order. * System.Web.Configuration/ModuleItem.cs: it's not public. * System.Web.Configuration/ModulesConfiguration.cs: it's not public. * System.Web.SessionState/SessionConfig.cs: * System.Web.SessionState/SessionStateSectionHandler.cs: new files to read <sessionState> configuration. svn path=/trunk/mcs/; revision=12118
54 lines
1.1 KiB
C#
54 lines
1.1 KiB
C#
//
|
|
// System.Web.Configuration.ModuleItem
|
|
//
|
|
// Author:
|
|
// Patrik Torstensson ([email protected])
|
|
//
|
|
using System;
|
|
|
|
namespace System.Web.Configuration {
|
|
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 ModuleItem(string name, Type type) {
|
|
_typeName = type.ToString ();
|
|
_name = name;
|
|
_type = type;
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
}
|