Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ProcessInputEventArgs.cs
- LoginName.cs
- AnnotationAdorner.cs
- ResourceDisplayNameAttribute.cs
- ProxyDataContractResolver.cs
- DesignTimeHTMLTextWriter.cs
- Switch.cs
- ToolStripContentPanelRenderEventArgs.cs
- FixedSOMTableRow.cs
- OutputCacheModule.cs
- CodeTypeReferenceCollection.cs
- Activity.cs
- XamlReader.cs
- CancelEventArgs.cs
- BasicExpressionVisitor.cs
- GenericPrincipal.cs
- DecimalKeyFrameCollection.cs
- CircleHotSpot.cs
- TypeDescriptorContext.cs
- XpsImageSerializationService.cs
- serverconfig.cs
- EntityDataSourceUtil.cs
- PageDeviceFont.cs
- HttpServerUtilityBase.cs
- IgnoreSection.cs
- SqlDataAdapter.cs
- QueryStringParameter.cs
- Track.cs
- NameValueCollection.cs
- ColorTransform.cs
- DataGridTextBox.cs
- ContentElementAutomationPeer.cs
- ImpersonationContext.cs
- InvalidFilterCriteriaException.cs
- StringResourceManager.cs
- XmlDataLoader.cs
- IndexerNameAttribute.cs
- DataErrorValidationRule.cs
- FormViewPageEventArgs.cs
- GeneralTransform3DTo2DTo3D.cs
- Control.cs
- SolidColorBrush.cs
- SynchronizingStream.cs
- CellPartitioner.cs
- FormsAuthenticationEventArgs.cs
- nulltextcontainer.cs
- LoadedOrUnloadedOperation.cs
- KeyValuePair.cs
- DataGridHeaderBorder.cs
- HostingEnvironmentException.cs
- FrameworkElementFactoryMarkupObject.cs
- URL.cs
- Point3DAnimationUsingKeyFrames.cs
- DefaultValueTypeConverter.cs
- XmlRawWriter.cs
- TcpClientChannel.cs
- WebPartTransformer.cs
- CodeTypeReferenceCollection.cs
- CompressedStack.cs
- HMACSHA1.cs
- PropertyTabAttribute.cs
- PositiveTimeSpanValidator.cs
- XmlILStorageConverter.cs
- AutomationPatternInfo.cs
- ParameterModifier.cs
- PanelContainerDesigner.cs
- DateTimeValueSerializer.cs
- BinaryMessageFormatter.cs
- SyndicationDeserializer.cs
- RunClient.cs
- DataGridViewAdvancedBorderStyle.cs
- GrammarBuilderRuleRef.cs
- FutureFactory.cs
- LinqDataSourceSelectEventArgs.cs
- AddressAlreadyInUseException.cs
- FormatSelectingMessageInspector.cs
- DataGridViewTopRowAccessibleObject.cs
- assertwrapper.cs
- CustomWebEventKey.cs
- XDRSchema.cs
- TraceHwndHost.cs
- ExecutionScope.cs
- SQLRoleProvider.cs
- entitydatasourceentitysetnameconverter.cs
- ReturnEventArgs.cs
- SecureConversationVersion.cs
- ResourceManager.cs
- XMLUtil.cs
- NetSectionGroup.cs
- SQLInt16Storage.cs
- MLangCodePageEncoding.cs
- DeleteIndexBinder.cs
- XsltContext.cs
- SpecularMaterial.cs
- NotifyParentPropertyAttribute.cs
- RectangleGeometry.cs
- PriorityQueue.cs
- Material.cs
- Interlocked.cs
- GridViewRowPresenter.cs