mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
41 lines
755 B
C#
41 lines
755 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 string ModuleName {
|
|
get {
|
|
return _name;
|
|
}
|
|
}
|
|
}
|
|
}
|