mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 12:31:30 -10:00
* System.Web/HttpApplication.cs: added new state to handle default authentication. * System.Web.Configuration/HttpModulesConfigurationHandler.cs: add a default authentication module at the end of the list. * System.Web.Configuration/ModuleItem.cs: new constructor. * System.Web.Security/DefaultAuthenticationModule.cs: implemented. It just create a default unauthenticated user when no one else provided one. * System.Web.Security/FormsAuthenticationModule.cs: removed debug output. * System.Web.UI/Control.cs: (AddedControl): take the children to the same state of the parent. (InitRecursive): set the page of the children. * System.Web.UI/Page.cs: removed one line (it's done a few lines above). * System.Web.UI/UserControl.cs: (OnInit): always call InitializeAsUserControl (InitializeAsUserControl): sets the page for the control. svn path=/trunk/mcs/; revision=10114
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 {
|
|
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 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;
|
|
}
|
|
}
|
|
}
|
|
}
|