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
- DataGridViewCellValidatingEventArgs.cs
- ParallelRangeManager.cs
- BehaviorEditorPart.cs
- CellQuery.cs
- DbReferenceCollection.cs
- ReferentialConstraint.cs
- ValueProviderWrapper.cs
- MediaContext.cs
- RuleInfoComparer.cs
- XhtmlBasicPageAdapter.cs
- MaskedTextBox.cs
- XmlSchemaParticle.cs
- RemoteWebConfigurationHostStream.cs
- SmtpClient.cs
- Splitter.cs
- UDPClient.cs
- PeerToPeerException.cs
- WeakReferenceKey.cs
- XmlQueryTypeFactory.cs
- UIntPtr.cs
- AdRotatorDesigner.cs
- XPathException.cs
- WsatServiceCertificate.cs
- DataGridViewTopLeftHeaderCell.cs
- WebBodyFormatMessageProperty.cs
- IisTraceWebEventProvider.cs
- ValueChangedEventManager.cs
- WebEventTraceProvider.cs
- HyperLinkStyle.cs
- IntegerValidatorAttribute.cs
- StateChangeEvent.cs
- ServiceNameElementCollection.cs
- SharedDp.cs
- TabPage.cs
- StorageMappingItemLoader.cs
- HostDesigntimeLicenseContext.cs
- AddInAdapter.cs
- XmlSortKey.cs
- InvalidOleVariantTypeException.cs
- SmtpReplyReader.cs
- XmlDictionary.cs
- ComboBoxAutomationPeer.cs
- DesignerProperties.cs
- Compiler.cs
- Size.cs
- ConnectionPoint.cs
- TimeEnumHelper.cs
- XamlReader.cs
- AesManaged.cs
- BitStack.cs
- UrlPath.cs
- AsyncOperationManager.cs
- SafeRightsManagementHandle.cs
- InternalResources.cs
- WhitespaceReader.cs
- basevalidator.cs
- ActivationProxy.cs
- GlobalAclOperationRequirement.cs
- BooleanProjectedSlot.cs
- ToolStripHighContrastRenderer.cs
- SettingsProperty.cs
- TypeSystem.cs
- CellQuery.cs
- EntityException.cs
- ThrowHelper.cs
- TransactionTraceIdentifier.cs
- SrgsRule.cs
- FunctionQuery.cs
- Lookup.cs
- ClientOperation.cs
- XmlWrappingReader.cs
- Window.cs
- TransformerInfo.cs
- OdbcStatementHandle.cs
- PointIndependentAnimationStorage.cs
- UrlMappingCollection.cs
- ImmutableObjectAttribute.cs
- PointValueSerializer.cs
- TemplateModeChangedEventArgs.cs
- JpegBitmapDecoder.cs
- CryptoApi.cs
- XhtmlConformanceSection.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- MessageParameterAttribute.cs
- LockCookie.cs
- FilterException.cs
- FileUtil.cs
- ContainerCodeDomSerializer.cs
- HttpException.cs
- LinkedList.cs
- SystemKeyConverter.cs
- MsmqAppDomainProtocolHandler.cs
- InternalMappingException.cs
- WebBrowserContainer.cs
- SiteMapNodeItemEventArgs.cs
- OleDbRowUpdatedEvent.cs
- HandlerBase.cs
- FixedSOMPageConstructor.cs
- CacheAxisQuery.cs
- TimeoutHelper.cs