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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ComplusEndpointConfigContainer.cs
- TextInfo.cs
- ConsumerConnectionPoint.cs
- BooleanAnimationBase.cs
- AuthenticationService.cs
- glyphs.cs
- HtmlMeta.cs
- SessionPageStateSection.cs
- transactioncontext.cs
- SHA512Cng.cs
- SineEase.cs
- CharacterMetricsDictionary.cs
- MetricEntry.cs
- isolationinterop.cs
- TraceHandlerErrorFormatter.cs
- ClientRoleProvider.cs
- InteropBitmapSource.cs
- ToolStripDropDownButton.cs
- WindowsEditBoxRange.cs
- VideoDrawing.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- XhtmlBasicCalendarAdapter.cs
- UseLicense.cs
- SqlUserDefinedAggregateAttribute.cs
- SelectionListComponentEditor.cs
- WithParamAction.cs
- MarshalDirectiveException.cs
- MenuTracker.cs
- HttpMethodAttribute.cs
- ExtenderProvidedPropertyAttribute.cs
- DataGridItemCollection.cs
- WeakEventManager.cs
- _NestedSingleAsyncResult.cs
- PanelDesigner.cs
- Label.cs
- COAUTHINFO.cs
- SessionState.cs
- UInt32Storage.cs
- EntityContainerRelationshipSetEnd.cs
- RouteTable.cs
- FixedSOMTableRow.cs
- EnvironmentPermission.cs
- BuildResult.cs
- DataGridItemEventArgs.cs
- SpnEndpointIdentity.cs
- WindowsContainer.cs
- SizeAnimationClockResource.cs
- DeploymentSectionCache.cs
- ErrorCodes.cs
- UnmanagedMarshal.cs
- autovalidator.cs
- MimePart.cs
- ReachFixedDocumentSerializerAsync.cs
- AuthenticationService.cs
- PointAnimationClockResource.cs
- EnterpriseServicesHelper.cs
- OleDbConnectionFactory.cs
- ColorTransformHelper.cs
- objectquery_tresulttype.cs
- ThreadStartException.cs
- RuntimeIdentifierPropertyAttribute.cs
- EventProxy.cs
- XmlSchemaDatatype.cs
- ImportContext.cs
- Tuple.cs
- DeclaredTypeElement.cs
- WebPartChrome.cs
- ReturnEventArgs.cs
- SafeBuffer.cs
- SynchronizationFilter.cs
- ProfileManager.cs
- EventListener.cs
- PlanCompiler.cs
- RectangleGeometry.cs
- Matrix.cs
- DiscoveryVersion.cs
- LinkedResource.cs
- RawUIStateInputReport.cs
- AQNBuilder.cs
- ImageDrawing.cs
- MaskedTextBoxDesignerActionList.cs
- OverrideMode.cs
- EntryWrittenEventArgs.cs
- AnnotationMap.cs
- WinEventQueueItem.cs
- ParallelLoopState.cs
- LifetimeServices.cs
- DefaultBindingPropertyAttribute.cs
- XNodeNavigator.cs
- TextWriter.cs
- TypeConverterAttribute.cs
- processwaithandle.cs
- BuildResult.cs
- FormCollection.cs
- VisualStyleRenderer.cs
- Effect.cs
- RotationValidation.cs
- BaseConfigurationRecord.cs
- BuilderElements.cs
- ListenUriMode.cs