Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / HostingEnvironmentSection.cs / 1305376 / HostingEnvironmentSection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.Globalization; using System.IO; using System.Text; using System.Web.Util; using System.ComponentModel; using System.Security.Permissions; public sealed class HostingEnvironmentSection : ConfigurationSection { internal const int DefaultShutdownTimeout = 30; internal static readonly TimeSpan DefaultIdleTimeout = TimeSpan.MaxValue; // default is Infinite internal static readonly TimeSpan DefaultUrlMetadataSlidingExpiration = TimeSpan.FromMinutes(1); //default is 00:01:00 internal const String sectionName = "system.web/hostingEnvironment"; private static ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propIdleTimeout = new ConfigurationProperty("idleTimeout", typeof(TimeSpan), DefaultIdleTimeout, StdValidatorsAndConverters.TimeSpanMinutesOrInfiniteConverter, StdValidatorsAndConverters.PositiveTimeSpanValidator, ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propShutdownTimeout = new ConfigurationProperty("shutdownTimeout", typeof(TimeSpan), TimeSpan.FromSeconds((double)DefaultShutdownTimeout), StdValidatorsAndConverters.TimeSpanSecondsConverter, StdValidatorsAndConverters.PositiveTimeSpanValidator, ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propShadowCopyBinAssemblies = new ConfigurationProperty("shadowCopyBinAssemblies", typeof(bool), true, ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propUrlMetadataSlidingExpiration = new ConfigurationProperty("urlMetadataSlidingExpiration", typeof(TimeSpan), DefaultUrlMetadataSlidingExpiration, StdValidatorsAndConverters.InfiniteTimeSpanConverter, new TimeSpanValidator(TimeSpan.Zero, TimeSpan.MaxValue), ConfigurationPropertyOptions.None); /**/ static HostingEnvironmentSection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propIdleTimeout); _properties.Add(_propShutdownTimeout); _properties.Add(_propShadowCopyBinAssemblies); _properties.Add(_propUrlMetadataSlidingExpiration); } public HostingEnvironmentSection() { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("shutdownTimeout", DefaultValue = "00:00:30")] [TypeConverter(typeof(TimeSpanSecondsConverter))] [TimeSpanValidator(MinValueString="00:00:00", MaxValueString=TimeSpanValidatorAttribute.TimeSpanMaxValue)] public TimeSpan ShutdownTimeout { get { return (TimeSpan)base[_propShutdownTimeout]; } set { base[_propShutdownTimeout] = value; } } [ConfigurationProperty("idleTimeout", DefaultValue = TimeSpanValidatorAttribute.TimeSpanMaxValue)] [TypeConverter(typeof(TimeSpanMinutesOrInfiniteConverter))] [TimeSpanValidator(MinValueString="00:00:00", MaxValueString=TimeSpanValidatorAttribute.TimeSpanMaxValue)] public TimeSpan IdleTimeout { get { return (TimeSpan)base[_propIdleTimeout]; } set { base[_propIdleTimeout] = value; } } [ConfigurationProperty("shadowCopyBinAssemblies", DefaultValue = true)] public bool ShadowCopyBinAssemblies { get { return (bool)base[_propShadowCopyBinAssemblies]; } set { base[_propShadowCopyBinAssemblies] = value; } } [ConfigurationProperty("urlMetadataSlidingExpiration", DefaultValue = "00:01:00")] [TypeConverter(typeof(InfiniteTimeSpanConverter))] [TimeSpanValidator(MinValueString="00:00:00", MaxValueString=TimeSpanValidatorAttribute.TimeSpanMaxValue)] public TimeSpan UrlMetadataSlidingExpiration { get { return (TimeSpan)base[_propUrlMetadataSlidingExpiration]; } set { base[_propUrlMetadataSlidingExpiration] = value; } } } } // 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
- InputBindingCollection.cs
- OdbcTransaction.cs
- ErrorEventArgs.cs
- WebRequestModulesSection.cs
- ArcSegment.cs
- Models.cs
- GradientStop.cs
- DataServiceKeyAttribute.cs
- SqlRewriteScalarSubqueries.cs
- ExpressionDumper.cs
- CounterCreationData.cs
- PublisherIdentityPermission.cs
- ExpressionDumper.cs
- AdapterUtil.cs
- WindowsButton.cs
- DelegateSerializationHolder.cs
- CleanUpVirtualizedItemEventArgs.cs
- XmlSchemaAny.cs
- TimeSpanParse.cs
- AppDomainUnloadedException.cs
- ITreeGenerator.cs
- CodeNamespaceImport.cs
- CommittableTransaction.cs
- XPathSelfQuery.cs
- ClaimComparer.cs
- SchemaImporter.cs
- DetailsView.cs
- TreeNodeSelectionProcessor.cs
- DllNotFoundException.cs
- XmlAttributeOverrides.cs
- BindMarkupExtensionSerializer.cs
- AppSettingsSection.cs
- EpmContentDeSerializerBase.cs
- Material.cs
- ToolBarOverflowPanel.cs
- _IPv4Address.cs
- Rect3D.cs
- DefaultValueAttribute.cs
- EdmItemCollection.OcAssemblyCache.cs
- WebBrowserProgressChangedEventHandler.cs
- DbDataReader.cs
- ProviderIncompatibleException.cs
- BookmarkNameHelper.cs
- MostlySingletonList.cs
- PasswordRecovery.cs
- XmlQualifiedNameTest.cs
- UserControl.cs
- ImmComposition.cs
- InputLanguageEventArgs.cs
- TaiwanCalendar.cs
- CAGDesigner.cs
- SQLSingle.cs
- InputReport.cs
- DataViewManager.cs
- CacheMemory.cs
- SmiMetaData.cs
- GetReadStreamResult.cs
- MarkupExtensionReturnTypeAttribute.cs
- HttpRuntime.cs
- TemplateBamlTreeBuilder.cs
- WSHttpBindingCollectionElement.cs
- pingexception.cs
- ProcessModelInfo.cs
- FilterableAttribute.cs
- ClientRolePrincipal.cs
- DataSvcMapFileSerializer.cs
- CollectionCodeDomSerializer.cs
- TreeViewEvent.cs
- DecoderReplacementFallback.cs
- ReverseInheritProperty.cs
- IsolatedStorage.cs
- DrawToolTipEventArgs.cs
- TdsParserSessionPool.cs
- HtmlToClrEventProxy.cs
- XmlSchemaDatatype.cs
- CompressedStack.cs
- MSAANativeProvider.cs
- ClientProtocol.cs
- SecurityState.cs
- AdapterUtil.cs
- Size3DValueSerializer.cs
- SimpleTypeResolver.cs
- ConstraintConverter.cs
- PeerCollaboration.cs
- CryptoStream.cs
- MailBnfHelper.cs
- FlowDocumentReader.cs
- StorageMappingFragment.cs
- RMEnrollmentPage2.cs
- AttributeSetAction.cs
- TypeSystem.cs
- QueryOperatorEnumerator.cs
- BookmarkCallbackWrapper.cs
- MenuItemCollectionEditorDialog.cs
- LoginNameDesigner.cs
- ContextMenu.cs
- IdentityElement.cs
- XamlReaderConstants.cs
- UnsafeNativeMethodsMilCoreApi.cs
- QueryConverter.cs