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
- Thickness.cs
- WinEventQueueItem.cs
- securitycriticaldata.cs
- WinFormsComponentEditor.cs
- StatusStrip.cs
- FilteredDataSetHelper.cs
- ComponentGuaranteesAttribute.cs
- CodeTypeMember.cs
- EventMap.cs
- Events.cs
- Win32Native.cs
- StylusTip.cs
- PocoEntityKeyStrategy.cs
- Classification.cs
- MSHTMLHostUtil.cs
- SlotInfo.cs
- PropertyIDSet.cs
- DataConnectionHelper.cs
- WindowsPrincipal.cs
- AssociationSetEnd.cs
- PrtTicket_Public.cs
- GridViewAutoFormat.cs
- BatchStream.cs
- X509IssuerSerialKeyIdentifierClause.cs
- DataPointer.cs
- WorkflowCompensationBehavior.cs
- RNGCryptoServiceProvider.cs
- TextBox.cs
- ToolStripContainerActionList.cs
- CompilerLocalReference.cs
- DeferredBinaryDeserializerExtension.cs
- Int32Collection.cs
- _BasicClient.cs
- RectIndependentAnimationStorage.cs
- DocumentViewerBase.cs
- ISFClipboardData.cs
- UInt32Converter.cs
- TagPrefixAttribute.cs
- SerializationIncompleteException.cs
- httpstaticobjectscollection.cs
- ContourSegment.cs
- Model3D.cs
- SqlXml.cs
- XPathAncestorQuery.cs
- EncodingDataItem.cs
- WebPartHelpVerb.cs
- KerberosReceiverSecurityToken.cs
- TreeNodeBinding.cs
- Single.cs
- Int16KeyFrameCollection.cs
- CodeActivityContext.cs
- HwndSourceKeyboardInputSite.cs
- InputLangChangeEvent.cs
- GraphicsState.cs
- RNGCryptoServiceProvider.cs
- COM2Enum.cs
- DataListItemCollection.cs
- FrameworkTemplate.cs
- PerformanceCounterPermission.cs
- Missing.cs
- FragmentQueryKB.cs
- MenuBase.cs
- UserPersonalizationStateInfo.cs
- InternalControlCollection.cs
- ProcessModule.cs
- EntityKeyElement.cs
- PropertyDescriptorCollection.cs
- RtfControls.cs
- DictionaryGlobals.cs
- FixedPosition.cs
- DrawingVisualDrawingContext.cs
- StringExpressionSet.cs
- SiteMapHierarchicalDataSourceView.cs
- DataViewSetting.cs
- ForEachAction.cs
- QilName.cs
- ISO2022Encoding.cs
- Timeline.cs
- OutputCacheModule.cs
- SqlParameterCollection.cs
- BookmarkScopeHandle.cs
- ValidationResult.cs
- UnsafeMethods.cs
- QilScopedVisitor.cs
- RequiredAttributeAttribute.cs
- CheckBoxFlatAdapter.cs
- CompilationUtil.cs
- VersionedStreamOwner.cs
- ArraySortHelper.cs
- ConstantExpression.cs
- NavigationPropertyAccessor.cs
- Quaternion.cs
- QueuePathDialog.cs
- ApplicationFileParser.cs
- HttpListenerResponse.cs
- Substitution.cs
- MessageContractImporter.cs
- FixUp.cs
- DataSourceControl.cs
- CounterSample.cs