Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / Configuration / HostingEnvironmentSection.cs / 2 / 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; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class HostingEnvironmentSection : ConfigurationSection { internal const int DefaultShutdownTimeout = 30; internal static readonly TimeSpan DefaultIdleTimeout = TimeSpan.MaxValue; // default is Infinite 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); /**/ static HostingEnvironmentSection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propIdleTimeout); _properties.Add(_propShutdownTimeout); _properties.Add(_propShadowCopyBinAssemblies); } 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; } } } } // 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
- CodeTypeMemberCollection.cs
- cookie.cs
- DifferencingCollection.cs
- UnsafeNativeMethodsTablet.cs
- XXXInfos.cs
- SQLBinary.cs
- Utilities.cs
- TogglePattern.cs
- AsymmetricKeyExchangeFormatter.cs
- ServiceElement.cs
- ComboBoxRenderer.cs
- _AutoWebProxyScriptHelper.cs
- UniqueEventHelper.cs
- HMACSHA384.cs
- XmlCountingReader.cs
- HttpProcessUtility.cs
- WindowsProgressbar.cs
- bidPrivateBase.cs
- WebPartUtil.cs
- TraceContextRecord.cs
- SchemaImporterExtensionsSection.cs
- HyperLinkStyle.cs
- IsolatedStorageFilePermission.cs
- MultiSelector.cs
- EventDescriptor.cs
- DataGridRowHeaderAutomationPeer.cs
- FamilyMapCollection.cs
- TransactionScopeDesigner.cs
- DataGridViewHitTestInfo.cs
- RequiredAttributeAttribute.cs
- BulletedList.cs
- TextOnlyOutput.cs
- StorageComplexPropertyMapping.cs
- ZoneButton.cs
- M3DUtil.cs
- followingquery.cs
- KerberosSecurityTokenProvider.cs
- RoutedEvent.cs
- ContentFilePart.cs
- DataPagerFieldCollection.cs
- WindowInteropHelper.cs
- SqlOuterApplyReducer.cs
- XPathScanner.cs
- PTProvider.cs
- GenericAuthenticationEventArgs.cs
- DataReaderContainer.cs
- SqlDataSourceStatusEventArgs.cs
- MappingModelBuildProvider.cs
- HttpRuntimeSection.cs
- MemberPath.cs
- Column.cs
- SHA1CryptoServiceProvider.cs
- BamlRecordHelper.cs
- CLSCompliantAttribute.cs
- AppSettingsSection.cs
- updateconfighost.cs
- SecurityProtocol.cs
- DetailsViewDeleteEventArgs.cs
- RelatedEnd.cs
- ThicknessAnimationUsingKeyFrames.cs
- MulticastNotSupportedException.cs
- _HTTPDateParse.cs
- TraceSwitch.cs
- EntityUtil.cs
- HtmlHead.cs
- AlternationConverter.cs
- ContextMenuStripGroup.cs
- ProjectionCamera.cs
- DateTimeStorage.cs
- SimpleRecyclingCache.cs
- DelegatedStream.cs
- HwndTarget.cs
- XMLSchema.cs
- GreenMethods.cs
- sqlnorm.cs
- ExtensibleClassFactory.cs
- LocatorGroup.cs
- DataTableNewRowEvent.cs
- WinFormsSecurity.cs
- TabItemWrapperAutomationPeer.cs
- TemplatePropertyEntry.cs
- PhysicalAddress.cs
- ToolStripDropDown.cs
- ProfileParameter.cs
- EncryptedKey.cs
- DefaultDiscoveryService.cs
- WindowsToolbar.cs
- CodeMethodInvokeExpression.cs
- WinHttpWebProxyFinder.cs
- DynamicEndpointElement.cs
- IISUnsafeMethods.cs
- ClusterSafeNativeMethods.cs
- PropertyManager.cs
- ParserStreamGeometryContext.cs
- NonVisualControlAttribute.cs
- TextDecoration.cs
- AssociatedControlConverter.cs
- RewritingValidator.cs
- Propagator.JoinPropagator.cs
- TemplateBindingExtension.cs