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
- AnimationTimeline.cs
- QilSortKey.cs
- LinqDataSource.cs
- TemplateLookupAction.cs
- Thread.cs
- CryptoApi.cs
- TrackingParameters.cs
- CodeExpressionCollection.cs
- CodeLabeledStatement.cs
- HttpGetClientProtocol.cs
- ViewStateModeByIdAttribute.cs
- OleDbParameter.cs
- HtmlInputSubmit.cs
- JavaScriptString.cs
- PreservationFileWriter.cs
- TypeUsage.cs
- ClientProxyGenerator.cs
- IFlowDocumentViewer.cs
- KeyValuePairs.cs
- BaseDataBoundControl.cs
- CodeTypeConstructor.cs
- ComponentResourceKey.cs
- WebBrowserEvent.cs
- FlowDocumentPaginator.cs
- CodeTypeMemberCollection.cs
- MultiView.cs
- PermissionSetTriple.cs
- CipherData.cs
- ToolStripSplitButton.cs
- AttributeConverter.cs
- UxThemeWrapper.cs
- dbdatarecord.cs
- XmlSchemaObjectTable.cs
- StrongName.cs
- DrawToolTipEventArgs.cs
- SyndicationFeed.cs
- UserValidatedEventArgs.cs
- ErrorHandler.cs
- DataStreamFromComStream.cs
- LastQueryOperator.cs
- ColumnReorderedEventArgs.cs
- AspNetCompatibilityRequirementsMode.cs
- StackOverflowException.cs
- TimersDescriptionAttribute.cs
- SchemaImporterExtensionElementCollection.cs
- TextServicesHost.cs
- ContentType.cs
- NotifyParentPropertyAttribute.cs
- Odbc32.cs
- DoubleIndependentAnimationStorage.cs
- InputScopeManager.cs
- XmlSchemaImporter.cs
- SetIterators.cs
- CodeStatementCollection.cs
- CookieProtection.cs
- WinInet.cs
- DataControlFieldCell.cs
- ZipFileInfoCollection.cs
- ViewPort3D.cs
- FieldNameLookup.cs
- RawStylusInputCustomDataList.cs
- TreeNodeConverter.cs
- DataGridViewElement.cs
- StreamGeometryContext.cs
- ParserOptions.cs
- RadialGradientBrush.cs
- BaseValidator.cs
- AnchoredBlock.cs
- StylusPointCollection.cs
- QueryCreatedEventArgs.cs
- WebConfigurationManager.cs
- XPathNodePointer.cs
- FrameDimension.cs
- ProtectedProviderSettings.cs
- GroupQuery.cs
- ComponentGuaranteesAttribute.cs
- CreateUserWizardStep.cs
- Dictionary.cs
- TextRangeEdit.cs
- AudioLevelUpdatedEventArgs.cs
- PenThreadWorker.cs
- DiffuseMaterial.cs
- PointLightBase.cs
- CheckBox.cs
- URIFormatException.cs
- CacheMode.cs
- ScaleTransform.cs
- HtmlWindow.cs
- Journaling.cs
- DoubleAnimationUsingKeyFrames.cs
- GorillaCodec.cs
- ReaderContextStackData.cs
- Animatable.cs
- FormatterServices.cs
- XPathEmptyIterator.cs
- WebPartVerb.cs
- DataSourceBooleanViewSchemaConverter.cs
- PrimitiveXmlSerializers.cs
- OpenTypeCommon.cs
- Positioning.cs