Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / xsp / System / Web / Extensions / ui / AppLevelCompilationSectionCache.cs / 1 / AppLevelCompilationSectionCache.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Configuration; using System.Security; using System.Security.Permissions; using System.Web.Configuration; // The compilation section can be defined below the application level, but ScriptManager only considers the // application-level debug setting. internal sealed class AppLevelCompilationSectionCache : ICompilationSection { private static readonly AppLevelCompilationSectionCache _instance = new AppLevelCompilationSectionCache(); // Value is cached statically, because AppLevelCompilationSectionCache is a Singleton. private bool? _debug; private AppLevelCompilationSectionCache() { } public static AppLevelCompilationSectionCache Instance { get { return _instance; } } public bool Debug { get { if (_debug == null) { _debug = GetDebugFromConfig(); } return _debug.Value; } } [ ConfigurationPermission(SecurityAction.Assert, Unrestricted = true), SecurityCritical(), SecurityTreatAsSafe(), ] private static bool GetDebugFromConfig() { CompilationSection section = (CompilationSection)WebConfigurationManager.GetWebApplicationSection("system.web/compilation"); return section.Debug; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Configuration; using System.Security; using System.Security.Permissions; using System.Web.Configuration; // The compilation section can be defined below the application level, but ScriptManager only considers the // application-level debug setting. internal sealed class AppLevelCompilationSectionCache : ICompilationSection { private static readonly AppLevelCompilationSectionCache _instance = new AppLevelCompilationSectionCache(); // Value is cached statically, because AppLevelCompilationSectionCache is a Singleton. private bool? _debug; private AppLevelCompilationSectionCache() { } public static AppLevelCompilationSectionCache Instance { get { return _instance; } } public bool Debug { get { if (_debug == null) { _debug = GetDebugFromConfig(); } return _debug.Value; } } [ ConfigurationPermission(SecurityAction.Assert, Unrestricted = true), SecurityCritical(), SecurityTreatAsSafe(), ] private static bool GetDebugFromConfig() { CompilationSection section = (CompilationSection)WebConfigurationManager.GetWebApplicationSection("system.web/compilation"); return section.Debug; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BaseUriHelper.cs
- PointKeyFrameCollection.cs
- ApplicationServicesHostFactory.cs
- LoadGrammarCompletedEventArgs.cs
- TransformGroup.cs
- DbModificationClause.cs
- OneOfElement.cs
- PrivilegeNotHeldException.cs
- TreeNodeBinding.cs
- MessageBox.cs
- WindowsSysHeader.cs
- Geometry.cs
- WebPartDescriptionCollection.cs
- GridSplitter.cs
- TreeWalker.cs
- GeometryGroup.cs
- PropertyGridEditorPart.cs
- WindowsUserNameCachingSecurityTokenAuthenticator.cs
- FtpWebRequest.cs
- InvalidPropValue.cs
- WebBrowserBase.cs
- XmlNamespaceManager.cs
- AnnotationComponentManager.cs
- SyntaxCheck.cs
- CompareInfo.cs
- ComPlusServiceLoader.cs
- KeyNotFoundException.cs
- HitTestParameters3D.cs
- BitmapEffectInput.cs
- LinkClickEvent.cs
- BaseTemplateParser.cs
- WebPart.cs
- StringDictionary.cs
- Assign.cs
- EdmEntityTypeAttribute.cs
- Mutex.cs
- DataRowChangeEvent.cs
- SHA1CryptoServiceProvider.cs
- ControlPropertyNameConverter.cs
- XmlToDatasetMap.cs
- MembershipPasswordException.cs
- HtmlHistory.cs
- LayoutSettings.cs
- UnionExpr.cs
- CuspData.cs
- StylusLogic.cs
- ValueExpressions.cs
- ContainerControlDesigner.cs
- PointAnimation.cs
- TemplatePagerField.cs
- DBDataPermission.cs
- BamlResourceSerializer.cs
- GroupBox.cs
- PassportAuthentication.cs
- HttpWrapper.cs
- SpellCheck.cs
- ObjectListCommandCollection.cs
- DesignerProperties.cs
- xmlfixedPageInfo.cs
- ScriptControlDescriptor.cs
- oledbmetadatacolumnnames.cs
- FtpCachePolicyElement.cs
- OdbcConnectionOpen.cs
- UrlAuthFailedErrorFormatter.cs
- ControlCachePolicy.cs
- XamlSerializer.cs
- LookupNode.cs
- BaseParser.cs
- DesignerVerb.cs
- XmlRawWriter.cs
- SapiInterop.cs
- BitmapEffectGroup.cs
- KeyValueSerializer.cs
- DbConnectionPoolIdentity.cs
- CqlParserHelpers.cs
- SymmetricKeyWrap.cs
- ListControl.cs
- selecteditemcollection.cs
- CellTreeNode.cs
- WorkflowDesigner.cs
- SetterBaseCollection.cs
- EntityContainerAssociationSetEnd.cs
- PrimitiveXmlSerializers.cs
- ProfilePropertySettingsCollection.cs
- Attributes.cs
- HttpContext.cs
- CompositionTarget.cs
- DetailsViewInsertedEventArgs.cs
- BitmapEncoder.cs
- CommonProperties.cs
- DataRelation.cs
- DialogResultConverter.cs
- WSSecurityPolicy12.cs
- TextBoxAutoCompleteSourceConverter.cs
- ToolStripControlHost.cs
- InputReport.cs
- DataStreamFromComStream.cs
- ConvertersCollection.cs
- TableCell.cs
- BaseHashHelper.cs