Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- AppDomainShutdownMonitor.cs
- SequenceDesigner.cs
- GraphicsState.cs
- MenuItemStyleCollection.cs
- XamlReaderHelper.cs
- WebWorkflowRole.cs
- WebConfigurationHostFileChange.cs
- CodeTypeConstructor.cs
- ManagementException.cs
- ResourceType.cs
- sqlser.cs
- SignedXml.cs
- InputEventArgs.cs
- InputScope.cs
- SqlRemoveConstantOrderBy.cs
- Propagator.JoinPropagator.cs
- AuthorizationSection.cs
- Misc.cs
- DataError.cs
- SessionParameter.cs
- CngKeyBlobFormat.cs
- Logging.cs
- MemoryFailPoint.cs
- DocumentSequence.cs
- UrlMappingsModule.cs
- ProtectedConfigurationSection.cs
- ClientConfigurationHost.cs
- pingexception.cs
- SuppressMessageAttribute.cs
- SourceChangedEventArgs.cs
- TimeZone.cs
- ModelItemCollection.cs
- InputScope.cs
- FrameworkElementFactoryMarkupObject.cs
- QuaternionAnimation.cs
- SecureUICommand.cs
- TrackingProfileCache.cs
- StoryFragments.cs
- HtmlForm.cs
- ToolBarButton.cs
- TransformedBitmap.cs
- ConstraintManager.cs
- MetadataPropertyvalue.cs
- SecurityKeyUsage.cs
- AccessDataSourceWizardForm.cs
- WebServiceMethodData.cs
- JournalNavigationScope.cs
- formatter.cs
- RectAnimation.cs
- GridItem.cs
- Msec.cs
- Model3D.cs
- ThreadInterruptedException.cs
- LassoHelper.cs
- PromptStyle.cs
- UnconditionalPolicy.cs
- ObjectListCommandsPage.cs
- EndpointAddressProcessor.cs
- SqlStatistics.cs
- SchemaTypeEmitter.cs
- LinkArea.cs
- FeatureAttribute.cs
- HttpCachePolicyElement.cs
- wmiutil.cs
- ConfigXmlAttribute.cs
- ToolbarAUtomationPeer.cs
- WindowsToolbar.cs
- RSAPKCS1KeyExchangeFormatter.cs
- RegularExpressionValidator.cs
- ObjectViewQueryResultData.cs
- ImageMap.cs
- FileUpload.cs
- StorageEntitySetMapping.cs
- ShaderEffect.cs
- BookmarkResumptionRecord.cs
- CustomGrammar.cs
- _FtpDataStream.cs
- _SslStream.cs
- ThrowHelper.cs
- ImageDesigner.cs
- GraphicsPathIterator.cs
- InheritanceRules.cs
- AsymmetricSignatureFormatter.cs
- EntityRecordInfo.cs
- BitmapEffectGroup.cs
- XPathDescendantIterator.cs
- DataGridViewColumnHeaderCell.cs
- DataTableMapping.cs
- AnimationStorage.cs
- SoapAttributeOverrides.cs
- Rect3D.cs
- SynchronizedReadOnlyCollection.cs
- KeySpline.cs
- QilXmlReader.cs
- DbModificationClause.cs
- MULTI_QI.cs
- DecodeHelper.cs
- _ProxyChain.cs
- ClientRoleProvider.cs
- MSHTMLHost.cs