Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / UI / DeploymentSectionCache.cs / 1305376 / 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), SecuritySafeCritical() ] 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- brushes.cs
- DataGridViewToolTip.cs
- ArrangedElementCollection.cs
- Button.cs
- ParentUndoUnit.cs
- SecurityKeyType.cs
- BinaryObjectInfo.cs
- WriteLine.cs
- Rectangle.cs
- RepeatButton.cs
- Reference.cs
- AlphaSortedEnumConverter.cs
- odbcmetadatafactory.cs
- SourceElementsCollection.cs
- UpdatePanelTriggerCollection.cs
- StringUtil.cs
- DataGridItemEventArgs.cs
- DataColumnSelectionConverter.cs
- ResXBuildProvider.cs
- ConfigXmlDocument.cs
- PolyQuadraticBezierSegment.cs
- ProgressChangedEventArgs.cs
- XmlSchemaValidationException.cs
- Stylus.cs
- QueryResponse.cs
- ProtocolsConfigurationHandler.cs
- WebPartConnection.cs
- OleDbStruct.cs
- SchemaImporterExtension.cs
- EmptyEnumerable.cs
- CodeTypeParameterCollection.cs
- TimeZone.cs
- DbConnectionStringCommon.cs
- AccessKeyManager.cs
- GridViewUpdateEventArgs.cs
- FileReservationCollection.cs
- UnsafeNativeMethods.cs
- DetailsViewDeleteEventArgs.cs
- NameScope.cs
- SqlCacheDependencyDatabase.cs
- SequentialUshortCollection.cs
- CharUnicodeInfo.cs
- EncryptedPackage.cs
- DynamicVirtualDiscoSearcher.cs
- TransformationRules.cs
- ServiceDescriptions.cs
- XmlTextWriter.cs
- AttributeSetAction.cs
- TemplatePropertyEntry.cs
- ResourceKey.cs
- XmlSignatureManifest.cs
- PageThemeBuildProvider.cs
- ModelTreeManager.cs
- ActiveDesignSurfaceEvent.cs
- Expression.cs
- ProfilePropertySettings.cs
- SingleAnimationUsingKeyFrames.cs
- SessionEndingEventArgs.cs
- SubstitutionList.cs
- OracleInfoMessageEventArgs.cs
- WindowShowOrOpenTracker.cs
- ValidateNames.cs
- AttachedPropertyBrowsableAttribute.cs
- WindowsRichEdit.cs
- MDIWindowDialog.cs
- ListBoxItem.cs
- DataServiceExpressionVisitor.cs
- ServiceNameElement.cs
- HTTPNotFoundHandler.cs
- Predicate.cs
- WebContentFormatHelper.cs
- Transactions.cs
- Pair.cs
- ValidatorCompatibilityHelper.cs
- HopperCache.cs
- AsymmetricSignatureFormatter.cs
- IconHelper.cs
- PageStatePersister.cs
- ToolStripDropDownItem.cs
- PaperSize.cs
- RuntimeHelpers.cs
- ComponentSerializationService.cs
- XmlHierarchyData.cs
- MetadataCache.cs
- DropSource.cs
- ReadOnlyDictionary.cs
- Model3D.cs
- BroadcastEventHelper.cs
- SolidBrush.cs
- X509CertificateTokenFactoryCredential.cs
- DataControlImageButton.cs
- ArraySegment.cs
- EpmContentSerializerBase.cs
- AssociatedControlConverter.cs
- XmlSerializer.cs
- GZipDecoder.cs
- ComponentChangingEvent.cs
- TextCharacters.cs
- CacheSection.cs
- TextStore.cs