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
- SessionPageStateSection.cs
- RequestSecurityTokenResponse.cs
- SwitchElementsCollection.cs
- TypeTypeConverter.cs
- PlaceHolder.cs
- StringComparer.cs
- UserPreferenceChangedEventArgs.cs
- ObjectDisposedException.cs
- SpellerHighlightLayer.cs
- OverflowException.cs
- LightweightCodeGenerator.cs
- DecimalAnimationUsingKeyFrames.cs
- EntitySqlQueryState.cs
- BinaryObjectReader.cs
- HierarchicalDataSourceControl.cs
- SessionSwitchEventArgs.cs
- InputLanguageManager.cs
- WebAdminConfigurationHelper.cs
- ObjectListTitleAttribute.cs
- MetadataPropertyvalue.cs
- StringHandle.cs
- PenCursorManager.cs
- NegotiateStream.cs
- WindowsFormsHostAutomationPeer.cs
- SafeWaitHandle.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- NotifyCollectionChangedEventArgs.cs
- RootBrowserWindowAutomationPeer.cs
- ColumnResizeAdorner.cs
- Margins.cs
- SocketConnection.cs
- SafeFileMappingHandle.cs
- DescendantQuery.cs
- SelectedDatesCollection.cs
- QilTypeChecker.cs
- HttpRequestBase.cs
- ShaderRenderModeValidation.cs
- PagerSettings.cs
- HttpProcessUtility.cs
- CacheRequest.cs
- ControlAdapter.cs
- StartUpEventArgs.cs
- CheckBoxPopupAdapter.cs
- StringWriter.cs
- EventDescriptor.cs
- XmlStrings.cs
- ResourceContainer.cs
- XmlSchemaType.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- SigningDialog.cs
- TimelineCollection.cs
- ManagementOperationWatcher.cs
- AggregationMinMaxHelpers.cs
- UDPClient.cs
- SqlDataSourceSelectingEventArgs.cs
- DbConnectionPoolCounters.cs
- XmlCharacterData.cs
- SourceFileBuildProvider.cs
- IndependentAnimationStorage.cs
- ExtensibleClassFactory.cs
- LayoutEvent.cs
- HtmlTableRowCollection.cs
- GenericTypeParameterBuilder.cs
- UriExt.cs
- validation.cs
- AddingNewEventArgs.cs
- XmlSchemaAll.cs
- HwndSourceParameters.cs
- SignedXmlDebugLog.cs
- UserControl.cs
- DesignerAttribute.cs
- CookieProtection.cs
- DelayedRegex.cs
- XPathDescendantIterator.cs
- AbandonedMutexException.cs
- StickyNoteContentControl.cs
- CodeRegionDirective.cs
- CopyNodeSetAction.cs
- Visitor.cs
- CharacterShapingProperties.cs
- Lease.cs
- HierarchicalDataSourceControl.cs
- assemblycache.cs
- EventSinkActivityDesigner.cs
- CacheVirtualItemsEvent.cs
- StructuredTypeEmitter.cs
- MenuItemAutomationPeer.cs
- UIPermission.cs
- DataBoundControlDesigner.cs
- securitymgrsite.cs
- RequestStatusBarUpdateEventArgs.cs
- ViewRendering.cs
- DebugView.cs
- storepermission.cs
- TdsValueSetter.cs
- _FtpDataStream.cs
- DataSourceCache.cs
- TextBoxView.cs
- PrintPageEvent.cs
- QuaternionAnimationBase.cs