Code:
/ DotNET / DotNET / 8.0 / untmp / Orcas / RTM / ndp / fx / src / xsp / System / Web / Extensions / ui / DeploymentSectionCache.cs / 1 / DeploymentSectionCache.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; // DeploymentSection can only be defined in machine.config, so it is safe to cache statically in the application internal sealed class DeploymentSectionCache : IDeploymentSection { private static readonly DeploymentSectionCache _instance = new DeploymentSectionCache(); // Value is cached statically, because DeploymentSectionCache is a Singleton. private bool? _retail; private DeploymentSectionCache() { } public static DeploymentSectionCache Instance { get { return _instance; } } public bool Retail { get { if (_retail == null) { _retail = GetRetailFromConfig(); } return _retail.Value; } } [ ConfigurationPermission(SecurityAction.Assert, Unrestricted = true), SecurityCritical(), SecurityTreatAsSafe(), ] private static bool GetRetailFromConfig() { DeploymentSection section = (DeploymentSection)WebConfigurationManager.GetSection("system.web/deployment"); return section.Retail; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PageThemeParser.cs
- Wizard.cs
- ClassValidator.cs
- SqlUdtInfo.cs
- XamlSerializer.cs
- SoapSchemaImporter.cs
- ObjectItemLoadingSessionData.cs
- SmiEventSink_Default.cs
- NetNamedPipeSecurity.cs
- ColumnMap.cs
- XDRSchema.cs
- ScrollChrome.cs
- CompositeDataBoundControl.cs
- FormViewDeletedEventArgs.cs
- ProfileSettings.cs
- CodeGotoStatement.cs
- HttpStaticObjectsCollectionWrapper.cs
- ResourceSetExpression.cs
- SimpleHandlerFactory.cs
- DataSourceDescriptorCollection.cs
- CutCopyPasteHelper.cs
- QueryAccessibilityHelpEvent.cs
- BaseComponentEditor.cs
- EmptyReadOnlyDictionaryInternal.cs
- RequestCachingSection.cs
- FileIOPermission.cs
- SQLRoleProvider.cs
- EntityType.cs
- VariantWrapper.cs
- KeyValuePair.cs
- CryptoConfig.cs
- EncryptedType.cs
- RowVisual.cs
- CodeStatementCollection.cs
- LayoutDump.cs
- WSSecureConversationDec2005.cs
- ChtmlImageAdapter.cs
- ACE.cs
- AlignmentYValidation.cs
- ProxyElement.cs
- Base64Encoder.cs
- ProcessThreadCollection.cs
- DataGridViewControlCollection.cs
- IndentTextWriter.cs
- NumberFormatter.cs
- MessageDecoder.cs
- PersonalizationProvider.cs
- NameScope.cs
- BuildProviderCollection.cs
- FontSizeConverter.cs
- MarkerProperties.cs
- RawStylusInput.cs
- EvidenceBase.cs
- ScriptingWebServicesSectionGroup.cs
- UidPropertyAttribute.cs
- KeyEvent.cs
- UnaryNode.cs
- CopyOfAction.cs
- BinaryUtilClasses.cs
- SourceFileBuildProvider.cs
- ProjectionNode.cs
- CodeNamespaceCollection.cs
- WeakHashtable.cs
- WindowsSolidBrush.cs
- SqlReferenceCollection.cs
- FieldAccessException.cs
- SqlException.cs
- TCEAdapterGenerator.cs
- SectionInformation.cs
- InvalidDocumentContentsException.cs
- _BufferOffsetSize.cs
- InstanceNotFoundException.cs
- OleDbError.cs
- NativeMethods.cs
- VersionedStream.cs
- PropertyItem.cs
- _PooledStream.cs
- AdRotator.cs
- ISSmlParser.cs
- RelatedCurrencyManager.cs
- IconBitmapDecoder.cs
- BinarySerializer.cs
- ThreadAbortException.cs
- ImageFormat.cs
- DynamicActionMessageFilter.cs
- ObjectQuery_EntitySqlExtensions.cs
- COAUTHIDENTITY.cs
- PseudoWebRequest.cs
- XamlGridLengthSerializer.cs
- DescendentsWalker.cs
- BigInt.cs
- COM2ExtendedUITypeEditor.cs
- EntityDataReader.cs
- UnicodeEncoding.cs
- ControlFilterExpression.cs
- FlowDocumentView.cs
- CodeTypeParameter.cs
- IdentityManager.cs
- BindingValueChangedEventArgs.cs
- FatalException.cs