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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlDocument.cs
- OdbcConnectionFactory.cs
- WsatProxy.cs
- WebHttpBehavior.cs
- Expression.DebuggerProxy.cs
- KeyNameIdentifierClause.cs
- GroupQuery.cs
- UrlMapping.cs
- AutomationFocusChangedEventArgs.cs
- RemoteAsymmetricSignatureFormatter.cs
- WorkflowInlining.cs
- NominalTypeEliminator.cs
- XmlQueryTypeFactory.cs
- X509IssuerSerialKeyIdentifierClause.cs
- Visual3DCollection.cs
- EditorAttribute.cs
- Focus.cs
- PublishLicense.cs
- ProviderBase.cs
- ResourceManagerWrapper.cs
- SyndicationElementExtensionCollection.cs
- IsolatedStorageException.cs
- SQLByteStorage.cs
- DataPagerFieldCollection.cs
- ThousandthOfEmRealDoubles.cs
- LabelInfo.cs
- TrustDriver.cs
- TagMapInfo.cs
- Event.cs
- BindingManagerDataErrorEventArgs.cs
- NamespaceListProperty.cs
- CodeMemberField.cs
- PagerSettings.cs
- XsltInput.cs
- FormViewActionList.cs
- CompilerHelpers.cs
- ObjectContext.cs
- XmlnsDictionary.cs
- RootBuilder.cs
- ProfilePropertyNameValidator.cs
- Property.cs
- graph.cs
- UrlMappingCollection.cs
- QueryContinueDragEventArgs.cs
- WebPartCloseVerb.cs
- ProfileManager.cs
- ExpressionPrefixAttribute.cs
- MouseCaptureWithinProperty.cs
- ProviderIncompatibleException.cs
- BitArray.cs
- ThreadStateException.cs
- BaseProcessor.cs
- FunctionImportElement.cs
- SettingsProviderCollection.cs
- XmlConverter.cs
- ColumnResult.cs
- SerializerDescriptor.cs
- ScriptResourceAttribute.cs
- DictionaryChange.cs
- HTMLTextWriter.cs
- ProviderConnectionPointCollection.cs
- HierarchicalDataSourceControl.cs
- _BaseOverlappedAsyncResult.cs
- TTSEvent.cs
- ToolStripDropDownDesigner.cs
- ImageSourceValueSerializer.cs
- XmlTextAttribute.cs
- FilterException.cs
- XmlNode.cs
- XmlWhitespace.cs
- EntryWrittenEventArgs.cs
- TimeSpanParse.cs
- TagMapInfo.cs
- LightweightCodeGenerator.cs
- GridViewPageEventArgs.cs
- TextEditorContextMenu.cs
- AdornerLayer.cs
- HashHelper.cs
- ClosureBinding.cs
- EmbeddedMailObjectsCollection.cs
- CodeMemberProperty.cs
- ValidationErrorCollection.cs
- SchemaTableColumn.cs
- Module.cs
- InvalidProgramException.cs
- FixedTextSelectionProcessor.cs
- Point.cs
- HttpProfileBase.cs
- SpanIndex.cs
- QueryStringParameter.cs
- TypeLoadException.cs
- FacetValueContainer.cs
- ClientUrlResolverWrapper.cs
- ClientBase.cs
- SimpleMailWebEventProvider.cs
- TileBrush.cs
- CssTextWriter.cs
- ParseChildrenAsPropertiesAttribute.cs
- NativeMethods.cs
- MemberRestriction.cs