Example #1
0
        /* stolen from the 1.0 S.W.Config ModulesConfiguration.cs */
        internal HttpModuleCollection LoadModules(HttpApplication app)
        {
            HttpModuleCollection coll = new HttpModuleCollection();
            Type type;

            foreach (HttpModuleAction item in Modules)
            {
                type = HttpApplication.LoadType(item.Type);

                if (type == null)
                {
                    /* XXX should we throw here? */
                    continue;
                }
                IHttpModule module = (IHttpModule)Activator.CreateInstance(type,
                                                                           BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance,
                                                                           null, null, null);
                module.Init(app);
                coll.AddModule(item.Name, module);
            }

            /* XXX the 1.x config stuff does this
             * indirectly..  I'm not sure we want to do it
             * here, but this keeps things working in much
             * the same fashion in 2.0-land. */
            {
                IHttpModule module = new DefaultAuthenticationModule();
                module.Init(app);
                coll.AddModule("DefaultAuthentication", module);
            }

            return(coll);
        }
        internal HttpModuleCollection CreateModules() {
            HttpModuleCollection modules = new HttpModuleCollection();

            foreach (HttpModuleAction module in Modules) {
                modules.AddModule(module.Entry.ModuleName, module.Entry.Create());
            }

            modules.AddModule("DefaultAuthentication", DefaultAuthenticationModule.CreateDefaultAuthenticationModuleWithAssert());

            return modules;
        }
Example #3
0
        internal HttpModuleCollection CreateModules()
        {
            HttpModuleCollection modules = new HttpModuleCollection();

            foreach (HttpModuleAction action in this.Modules)
            {
                modules.AddModule(action.Entry.ModuleName, action.Entry.Create());
            }
            modules.AddModule("DefaultAuthentication", DefaultAuthenticationModule.CreateDefaultAuthenticationModuleWithAssert());
            return(modules);
        }
        internal HttpModuleCollection CreateModules()
        {
            HttpModuleCollection modules = new HttpModuleCollection();

            foreach (ModulesEntry m in _list)
            {
                modules.AddModule(m.ModuleName, m.Create());
            }

            modules.AddModule("DefaultAuthentication", new System.Web.Security.DefaultAuthenticationModule());

            return(modules);
        }
		/* stolen from the 1.0 S.W.Config ModulesConfiguration.cs */
		internal HttpModuleCollection LoadModules (HttpApplication app)
		{
			HttpModuleCollection coll = new HttpModuleCollection ();
			Type type;
			
			foreach (HttpModuleAction item in Modules){
				type = HttpApplication.LoadType (item.Type);
				
				if (type == null) {
					/* XXX should we throw here? */
					continue;
				}
				IHttpModule module = (IHttpModule) Activator.CreateInstance (type,
											     BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance,
											     null, null, null);
				module.Init (app);
				coll.AddModule (item.Name, module);
			}

			/* XXX the 1.x config stuff does this
			 * indirectly..  I'm not sure we want to do it
			 * here, but this keeps things working in much
			 * the same fashion in 2.0-land. */
			{
				IHttpModule module = new DefaultAuthenticationModule ();
				module.Init (app);
				coll.AddModule ("DefaultAuthentication", module);
			}

			return coll;
		}
		public HttpModuleCollection CreateCollection ()
		{
			HttpModuleCollection items = new HttpModuleCollection ();
			foreach (ModuleItem item in modules)
				items.AddModule (item.ModuleName, item.Create ());

			return items;
		}
Example #7
0
        public HttpModuleCollection LoadModules(HttpApplication app)
        {
            HttpModuleCollection coll = new HttpModuleCollection();

            foreach (ModuleItem item in Modules)
            {
                IHttpModule module = (IHttpModule)Activator.CreateInstance(item.Type, true);
                module.Init(app);
                coll.AddModule(item.Name, module);
            }

            return(coll);
        }
		public HttpModuleCollection LoadModules (HttpApplication app)
		{
			HttpModuleCollection coll = new HttpModuleCollection ();
			foreach (ModuleItem item in Modules) {
				IHttpModule module = (IHttpModule) Activator.CreateInstance (item.Type, true);
				module.Init (app);
				coll.AddModule (item.Name, module);
			}

			return coll;
		}