Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- WebPartManagerDesigner.cs
- TypeNameHelper.cs
- CalendarAutomationPeer.cs
- MessageFormatterConverter.cs
- PolicyException.cs
- DependencyPropertyKind.cs
- SelectionManager.cs
- ApplicationServicesHostFactory.cs
- ConnectionManager.cs
- HttpFileCollectionBase.cs
- DataServiceBehavior.cs
- DataSpaceManager.cs
- TdsParserSessionPool.cs
- DateBoldEvent.cs
- PropertyTabAttribute.cs
- COMException.cs
- DetailsViewInsertEventArgs.cs
- compensatingcollection.cs
- DisplayMemberTemplateSelector.cs
- BitmapEffectOutputConnector.cs
- Renderer.cs
- KeysConverter.cs
- SelectedDatesCollection.cs
- KnownAssemblyEntry.cs
- _SslStream.cs
- PathSegment.cs
- TcpTransportSecurity.cs
- SystemResourceKey.cs
- GorillaCodec.cs
- JsonClassDataContract.cs
- RootProfilePropertySettingsCollection.cs
- ClientApiGenerator.cs
- wgx_render.cs
- QueryReaderSettings.cs
- TargetConverter.cs
- Validator.cs
- DesignTimeTemplateParser.cs
- initElementDictionary.cs
- ResXFileRef.cs
- DirectionalLight.cs
- ResourceBinder.cs
- Quaternion.cs
- WindowsButton.cs
- WebPartEditorApplyVerb.cs
- adornercollection.cs
- WebHttpBindingCollectionElement.cs
- ProcessHostConfigUtils.cs
- GridViewEditEventArgs.cs
- Separator.cs
- ToolStripSplitButton.cs
- FontSource.cs
- Config.cs
- MarkupObject.cs
- TitleStyle.cs
- RbTree.cs
- MaterialGroup.cs
- X509CertificateStore.cs
- shaperfactoryquerycacheentry.cs
- HtmlInputControl.cs
- SQLDoubleStorage.cs
- FormsAuthentication.cs
- PreDigestedSignedInfo.cs
- HtmlInputCheckBox.cs
- ReadOnlyActivityGlyph.cs
- HttpInputStream.cs
- WebBrowserPermission.cs
- TypeSchema.cs
- BitmapSizeOptions.cs
- SqlNotificationRequest.cs
- ProcessHostFactoryHelper.cs
- QilInvoke.cs
- Image.cs
- ImagingCache.cs
- TextDecorations.cs
- WebProxyScriptElement.cs
- _OSSOCK.cs
- TextTreeNode.cs
- TextChangedEventArgs.cs
- UIElementPropertyUndoUnit.cs
- RealProxy.cs
- UnmanagedMemoryStream.cs
- Parallel.cs
- MultipleViewPattern.cs
- ColumnHeader.cs
- SingleResultAttribute.cs
- ActivityValidator.cs
- FormsAuthenticationEventArgs.cs
- BaseUriHelper.cs
- ImpersonationContext.cs
- UnsafeNativeMethods.cs
- DependencyPropertyValueSerializer.cs
- DataSet.cs
- StaticFileHandler.cs
- AccessibleObject.cs
- PartialCachingControl.cs
- KeyTime.cs
- Image.cs
- Html32TextWriter.cs
- WebExceptionStatus.cs
- SQLInt64Storage.cs