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
- TypedRowGenerator.cs
- OleDbDataReader.cs
- TimeSpanValidatorAttribute.cs
- oledbconnectionstring.cs
- TextEditorLists.cs
- StatusBarPanel.cs
- StyleConverter.cs
- ForeignConstraint.cs
- Tag.cs
- ElementHostAutomationPeer.cs
- OdbcEnvironment.cs
- Int64KeyFrameCollection.cs
- GeneralTransform3DCollection.cs
- TemplateLookupAction.cs
- WebEventTraceProvider.cs
- SingleObjectCollection.cs
- SqlClientWrapperSmiStream.cs
- HtmlForm.cs
- DatagridviewDisplayedBandsData.cs
- SqlGatherProducedAliases.cs
- FlowDocumentPageViewerAutomationPeer.cs
- SafeRightsManagementPubHandle.cs
- UDPClient.cs
- HtmlTitle.cs
- CategoryNameCollection.cs
- DropDownButton.cs
- AliasExpr.cs
- AnnotationStore.cs
- QfeChecker.cs
- InternalException.cs
- DataGridPagerStyle.cs
- DescendentsWalker.cs
- XmlFormatExtensionAttribute.cs
- FormsAuthenticationConfiguration.cs
- DataQuery.cs
- CellPartitioner.cs
- SocketInformation.cs
- MemoryMappedViewAccessor.cs
- WebProxyScriptElement.cs
- MemoryRecordBuffer.cs
- SharedTcpTransportManager.cs
- RayHitTestParameters.cs
- Icon.cs
- XmlDomTextWriter.cs
- XmlCodeExporter.cs
- UserInitiatedRoutedEventPermission.cs
- ApplicationManager.cs
- HScrollBar.cs
- XPathScanner.cs
- RectKeyFrameCollection.cs
- IsolatedStorageFile.cs
- SettingsPropertyValueCollection.cs
- DataBoundControl.cs
- QilBinary.cs
- DependencySource.cs
- NavigatorInput.cs
- SmtpDateTime.cs
- WorkflowFormatterBehavior.cs
- NTAccount.cs
- ProgressChangedEventArgs.cs
- WindowsContainer.cs
- EntityDataSourceContextCreatedEventArgs.cs
- DbProviderFactory.cs
- LinkLabel.cs
- Application.cs
- GB18030Encoding.cs
- SymDocumentType.cs
- ReadOnlyHierarchicalDataSource.cs
- ByteStack.cs
- ViewManager.cs
- StringAnimationUsingKeyFrames.cs
- FunctionMappingTranslator.cs
- ConfigDefinitionUpdates.cs
- TransportBindingElementImporter.cs
- CaseExpr.cs
- ImportFileRequest.cs
- TrackingSection.cs
- DrawingContextWalker.cs
- EventLogException.cs
- XMLDiffLoader.cs
- WorkflowMarkupSerializationException.cs
- MessageBox.cs
- ValidationHelper.cs
- WebPartMovingEventArgs.cs
- COMException.cs
- XmlSortKeyAccumulator.cs
- ScriptResourceDefinition.cs
- EntityReference.cs
- _NestedMultipleAsyncResult.cs
- FileSystemEventArgs.cs
- precedingquery.cs
- ValueUtilsSmi.cs
- HttpServerUtilityWrapper.cs
- WebPartDisplayModeCollection.cs
- DataTable.cs
- ScaleTransform3D.cs
- SQLInt16Storage.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- CodeDelegateInvokeExpression.cs
- WebPartConnectVerb.cs