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
- WebPartMenu.cs
- wmiprovider.cs
- RawStylusInputCustomDataList.cs
- ToolStripItemTextRenderEventArgs.cs
- ChainedAsyncResult.cs
- HttpException.cs
- ResXDataNode.cs
- ProcessHost.cs
- DbParameterCollection.cs
- Point.cs
- FormView.cs
- ScriptManagerProxy.cs
- RoutedUICommand.cs
- URLMembershipCondition.cs
- XmlSchemaSimpleTypeRestriction.cs
- __FastResourceComparer.cs
- Pts.cs
- XmlSchemaObjectTable.cs
- Section.cs
- SendMailErrorEventArgs.cs
- PersistChildrenAttribute.cs
- PathNode.cs
- SecurityElementBase.cs
- XmlUtil.cs
- ServiceModelSectionGroup.cs
- CachedFontFace.cs
- XsltLibrary.cs
- HttpResponseInternalWrapper.cs
- StrongNameMembershipCondition.cs
- LineProperties.cs
- MsmqInputChannelListenerBase.cs
- InternalEnumValidatorAttribute.cs
- CompiledRegexRunner.cs
- SchemaMapping.cs
- ServiceParser.cs
- ArgumentException.cs
- StrokeNode.cs
- SamlAttribute.cs
- Component.cs
- DesignerOptionService.cs
- Hex.cs
- FormatterServices.cs
- CheckBoxRenderer.cs
- PathTooLongException.cs
- TextBoxAutoCompleteSourceConverter.cs
- DrawingState.cs
- EventTrigger.cs
- RoutedUICommand.cs
- InstalledVoice.cs
- BamlRecordWriter.cs
- GiveFeedbackEventArgs.cs
- SignerInfo.cs
- CodeMemberProperty.cs
- AuthenticationConfig.cs
- ColorTranslator.cs
- SafePointer.cs
- SettingsAttributeDictionary.cs
- basenumberconverter.cs
- SQLDateTimeStorage.cs
- FlowDocumentScrollViewer.cs
- InfocardExtendedInformationEntry.cs
- StringAttributeCollection.cs
- DataViewManager.cs
- KeyboardDevice.cs
- ObjectStateManagerMetadata.cs
- DataGridItem.cs
- XamlTreeBuilderBamlRecordWriter.cs
- WeakKeyDictionary.cs
- SevenBitStream.cs
- CleanUpVirtualizedItemEventArgs.cs
- SqlOuterApplyReducer.cs
- QueryExpr.cs
- MessageBox.cs
- DefaultProxySection.cs
- CanonicalFontFamilyReference.cs
- PopupEventArgs.cs
- TextSerializer.cs
- DbTransaction.cs
- UrlAuthorizationModule.cs
- DataGridCellItemAutomationPeer.cs
- CaseExpr.cs
- ObjectStorage.cs
- PeerNameResolver.cs
- ButtonColumn.cs
- AnonymousIdentificationModule.cs
- UserPreferenceChangingEventArgs.cs
- ApplicationId.cs
- AuthenticateEventArgs.cs
- AppModelKnownContentFactory.cs
- PostBackOptions.cs
- SchemaMerger.cs
- ConfigurationSectionCollection.cs
- DBConcurrencyException.cs
- DbConnectionOptions.cs
- StringFreezingAttribute.cs
- SQLByteStorage.cs
- DropDownButton.cs
- GroupBoxRenderer.cs
- SoapMessage.cs
- Tablet.cs