Exemplo n.º 1
0
            private static void AddModuleToIntegratedPipeline(Type moduleType)
            {
                if (!_integratedPipelineInitialized)
                {
                    _integratedPipelineInitialized = true;
                    InitializeIntegratedPipeline();
                }
                DynamicModuleRegistryEntry item = CreateDynamicModuleRegistryEntry(moduleType);

                IntegratedDynamicModule.CriticalStatics.DynamicEntries.Add(item);
            }
Exemplo n.º 2
0
            private static void AddModuleToClassicPipeline(Type moduleType)
            {
                HttpModulesSection httpModulesFromAppConfig = null;

                try
                {
                    object target = _reflectionUtil.GetAppConfig();
                    httpModulesFromAppConfig = _reflectionUtil.GetHttpModulesFromAppConfig(target);
                    _reflectionUtil.SetConfigurationElementCollectionReadOnlyBit(httpModulesFromAppConfig.Modules, false);
                    DynamicModuleRegistryEntry entry = CreateDynamicModuleRegistryEntry(moduleType);
                    httpModulesFromAppConfig.Modules.Add(new HttpModuleAction(entry.Name, entry.Type));
                }
                finally
                {
                    if (httpModulesFromAppConfig != null)
                    {
                        _reflectionUtil.SetConfigurationElementCollectionReadOnlyBit(httpModulesFromAppConfig.Modules, true);
                    }
                }
            }