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
- TableDetailsCollection.cs
- Panel.cs
- TextEncodedRawTextWriter.cs
- SerializationFieldInfo.cs
- ToolboxItemImageConverter.cs
- RayMeshGeometry3DHitTestResult.cs
- TextProviderWrapper.cs
- RuntimeWrappedException.cs
- SiteMapPath.cs
- TablePattern.cs
- AutomationElementIdentifiers.cs
- SqlProfileProvider.cs
- MustUnderstandBehavior.cs
- BrowserCapabilitiesFactoryBase.cs
- PenContext.cs
- SqlNodeTypeOperators.cs
- WebPartExportVerb.cs
- DetailsViewDeletedEventArgs.cs
- SubtreeProcessor.cs
- WsdlBuildProvider.cs
- AtomMaterializerLog.cs
- OdbcConnectionPoolProviderInfo.cs
- CodeMethodInvokeExpression.cs
- ExpandSegmentCollection.cs
- SqlUnionizer.cs
- RayMeshGeometry3DHitTestResult.cs
- AngleUtil.cs
- Pair.cs
- TableCellCollection.cs
- Soap.cs
- Convert.cs
- SoapReflector.cs
- TextMetrics.cs
- ProtocolsConfigurationHandler.cs
- PaperSource.cs
- MonitorWrapper.cs
- Completion.cs
- MissingMemberException.cs
- DrawListViewSubItemEventArgs.cs
- Privilege.cs
- WebPartActionVerb.cs
- StorageTypeMapping.cs
- WorkflowViewService.cs
- Vector3DConverter.cs
- UpdateCommandGenerator.cs
- HotSpotCollectionEditor.cs
- StaticContext.cs
- OdbcConnectionHandle.cs
- ContainerVisual.cs
- RoleManagerEventArgs.cs
- StorageAssociationSetMapping.cs
- EmptyEnumerator.cs
- ToolStripPanel.cs
- EllipticalNodeOperations.cs
- ToolStripProgressBar.cs
- DataSourceExpression.cs
- Parallel.cs
- CmsInterop.cs
- TrackingMemoryStreamFactory.cs
- BamlReader.cs
- HtmlButton.cs
- NavigateUrlConverter.cs
- UniformGrid.cs
- ExtendedPropertyDescriptor.cs
- WebPartCatalogAddVerb.cs
- ConnectivityStatus.cs
- BidPrivateBase.cs
- FixedSOMPageElement.cs
- HtmlHead.cs
- TypefaceMetricsCache.cs
- AnnotationComponentManager.cs
- PageAsyncTask.cs
- DataGridViewRowStateChangedEventArgs.cs
- ToolStripDropDownClosedEventArgs.cs
- ConnectionStringSettingsCollection.cs
- DataSourceProvider.cs
- CapabilitiesAssignment.cs
- SQLDouble.cs
- Point3DKeyFrameCollection.cs
- SchemaCreator.cs
- TrackingMemoryStream.cs
- Header.cs
- DependencyPropertyDescriptor.cs
- XamlClipboardData.cs
- ContainerFilterService.cs
- CallSiteHelpers.cs
- FontConverter.cs
- XmlSyndicationContent.cs
- EpmCustomContentDeSerializer.cs
- ToolBar.cs
- DocumentXPathNavigator.cs
- VisualStates.cs
- QueuePathDialog.cs
- StorageAssociationTypeMapping.cs
- MessageSecurityOverHttpElement.cs
- ImageMapEventArgs.cs
- TimeStampChecker.cs
- SqlRetyper.cs
- Journaling.cs
- TcpClientCredentialType.cs