public virtual void SystemWeb() { #if !ClientSKUFramework // update MaxRequestLength in system.web/httpRuntime section HttpRuntimeSection httpRuntimeSection = (HttpRuntimeSection)config.GetSection("system.web/httpRuntime"); httpRuntimeSection.MaxRequestLength = _MaxRequestLength; // update system.web/trust TrustSection trustSection = (TrustSection)config.GetSection("system.web/trust"); trustSection.SectionInformation.SetRawXml(string.Format(trustSection.SectionInformation.GetRawXml(), _TrustLevel)); CompilationSection compilationSection = (CompilationSection)config.GetSection("system.web/compilation"); // update system.web/compilation/debug compilationSection.Debug = _CompilationDebug; // update assembly strings in system.web/compilation section foreach (AssemblyInfo assemblyItem in compilationSection.Assemblies) { var version = assemblyItem.Assembly.StartsWith("System.Data.Entity") ? _EntityAssemblyVersion : _AssemblyVersion; if (assemblyItem.Assembly.Contains("Test")) { // Test assemblies have the same version version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); } assemblyItem.Assembly = String.Format(assemblyItem.Assembly, version, _AssemblyDomain, _AssemblyDomainVersion, _AssemblyPublicKeyToken); } // Setup the correct buildProvider settings if necessary bool shouldOverrideMachineWebConfigSettings = ShouldOverrideExistingBuildProviderSettings(_AssemblyDomain, _AssemblyDomainVersion, _AssemblyPublicKeyToken); if (shouldOverrideMachineWebConfigSettings) { // update the handler versions compilationSection.FolderLevelBuildProviders.Clear(); var folderLevelBuildProvider = new FolderLevelBuildProvider("DataServiceBuildProvider", "Microsoft.OData.Service.BuildProvider.DataServiceBuildProvider"); compilationSection.FolderLevelBuildProviders.Add(folderLevelBuildProvider); } // update authentication mode in system.web/authentication AuthenticationSection authenticationSection = (AuthenticationSection)config.GetSection("system.web/authentication"); switch (_AuthMode.ToLower()) { case "forms": authenticationSection.Mode = System.Web.Configuration.AuthenticationMode.Forms; break; case "passport": authenticationSection.Mode = System.Web.Configuration.AuthenticationMode.Passport; break; case "windows": authenticationSection.Mode = System.Web.Configuration.AuthenticationMode.Windows; break; default: authenticationSection.Mode = System.Web.Configuration.AuthenticationMode.None; break; } // update httpHandler versions in system.web/httpHandlers section HttpHandlersSection httpHandlersSection = (HttpHandlersSection)config.GetSection("system.web/httpHandlers"); foreach (HttpHandlerAction httpHandler in httpHandlersSection.Handlers) { httpHandler.Type = String.Format(httpHandler.Type, _AssemblyVersion); } #endif }
// this override is required because AppliesTo may be in any order in the // property string but it still and the default equals operator would consider // them different depending on order in the persisted string. public override bool Equals(object provider) { FolderLevelBuildProvider o = provider as FolderLevelBuildProvider; return(o != null && StringUtil.EqualsIgnoreCase(Name, o.Name) && Type == o.Type); }
public void Add(FolderLevelBuildProvider buildProvider) { BaseAdd(buildProvider); }
public void Add(FolderLevelBuildProvider buildProvider) { }
public void Add(FolderLevelBuildProvider buildProvider) { this.BaseAdd(buildProvider); }
public override bool Equals(object provider) { FolderLevelBuildProvider provider2 = provider as FolderLevelBuildProvider; return(((provider2 != null) && System.Web.Util.StringUtil.EqualsIgnoreCase(this.Name, provider2.Name)) && (this.Type == provider2.Type)); }