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
- CatalogZone.cs
- TextEditorCopyPaste.cs
- _UriSyntax.cs
- mda.cs
- DataObjectEventArgs.cs
- Point4D.cs
- EntityModelSchemaGenerator.cs
- SecurityChannelListener.cs
- MarshalByRefObject.cs
- Visual3D.cs
- ObjectStateFormatter.cs
- SingleAnimation.cs
- CompilerGlobalScopeAttribute.cs
- HtmlInputCheckBox.cs
- ListDictionaryInternal.cs
- ConnectionsZone.cs
- GradientStopCollection.cs
- InteropAutomationProvider.cs
- TypeSystem.cs
- HttpRequestCacheValidator.cs
- PeerUnsafeNativeMethods.cs
- DetailsViewDeleteEventArgs.cs
- EventDescriptor.cs
- NavigateEvent.cs
- UIElement3D.cs
- RoutingExtension.cs
- ProcessHostMapPath.cs
- DependencyPropertyAttribute.cs
- XmlCodeExporter.cs
- EntitySetBase.cs
- AnnotationAuthorChangedEventArgs.cs
- DynamicActionMessageFilter.cs
- TextEditorCopyPaste.cs
- Dispatcher.cs
- DataGridViewHeaderCell.cs
- DataTableMapping.cs
- HealthMonitoringSection.cs
- ReversePositionQuery.cs
- DeriveBytes.cs
- CodeTypeReferenceExpression.cs
- CellConstant.cs
- ReadOnlyHierarchicalDataSourceView.cs
- LinkLabelLinkClickedEvent.cs
- Panel.cs
- BoundField.cs
- ComboBox.cs
- TextPattern.cs
- SafeArrayRankMismatchException.cs
- XhtmlBasicImageAdapter.cs
- XmlStreamedByteStreamReader.cs
- ListViewCommandEventArgs.cs
- DemultiplexingClientMessageFormatter.cs
- XsdBuildProvider.cs
- XPathNodeIterator.cs
- ZoomPercentageConverter.cs
- Point.cs
- ControlValuePropertyAttribute.cs
- SimplePropertyEntry.cs
- Renderer.cs
- ChameleonKey.cs
- DbConnectionHelper.cs
- BitmapSource.cs
- EdmPropertyAttribute.cs
- _OSSOCK.cs
- EmbeddedMailObject.cs
- OracleCommandBuilder.cs
- TriggerBase.cs
- ConfigXmlSignificantWhitespace.cs
- DeploymentExceptionMapper.cs
- TrackBarDesigner.cs
- ClientSettingsStore.cs
- ProxyWebPartConnectionCollection.cs
- EntityDataSourceConfigureObjectContextPanel.cs
- NetworkCredential.cs
- Point4D.cs
- BitmapFrame.cs
- RubberbandSelector.cs
- SplitterPanelDesigner.cs
- Itemizer.cs
- BaseTreeIterator.cs
- Rotation3DKeyFrameCollection.cs
- Base64Encoder.cs
- DictionaryEntry.cs
- AdornerHitTestResult.cs
- DataRowCollection.cs
- LineBreakRecord.cs
- selecteditemcollection.cs
- FamilyMapCollection.cs
- HttpCapabilitiesBase.cs
- ExceptionUtil.cs
- Int32RectValueSerializer.cs
- DataGridItemEventArgs.cs
- KeyTimeConverter.cs
- CatalogPartCollection.cs
- GcSettings.cs
- BooleanConverter.cs
- OleDbConnection.cs
- CqlWriter.cs
- ZipIOLocalFileBlock.cs
- MenuItemCollection.cs