Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / Configuration / HostingEnvironmentSection.cs / 5 / 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. // //----------------------------------------------------------------------------- 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- mda.cs
- MetadataPropertyAttribute.cs
- IteratorFilter.cs
- ColumnMap.cs
- EntityTransaction.cs
- CacheEntry.cs
- CallbackTimeoutsElement.cs
- ProxyWebPart.cs
- ContentHostHelper.cs
- ViewLoader.cs
- PerformanceCounterCategory.cs
- CurrentTimeZone.cs
- TemplateXamlParser.cs
- SafeCoTaskMem.cs
- RSAPKCS1KeyExchangeFormatter.cs
- RewritingValidator.cs
- SqlInternalConnectionSmi.cs
- SafeNativeMethods.cs
- Win32Native.cs
- HwndMouseInputProvider.cs
- FlowchartSizeFeature.cs
- SqlCrossApplyToCrossJoin.cs
- UIElementAutomationPeer.cs
- ProcessInfo.cs
- DiagnosticsConfigurationHandler.cs
- SingleAnimation.cs
- WindowsToolbarAsMenu.cs
- HtmlInputPassword.cs
- MethodBody.cs
- MenuItemAutomationPeer.cs
- SqlCacheDependencyDatabase.cs
- ColorContext.cs
- GroupByExpressionRewriter.cs
- TypeKeyValue.cs
- AuthorizationRule.cs
- SecurityHelper.cs
- MultipartIdentifier.cs
- LinkClickEvent.cs
- ReadOnlyObservableCollection.cs
- XmlSchemaSubstitutionGroup.cs
- SelectionWordBreaker.cs
- DispatcherTimer.cs
- safemediahandle.cs
- ProcessModuleCollection.cs
- SurrogateEncoder.cs
- InheritanceUI.cs
- ButtonColumn.cs
- assertwrapper.cs
- DataSourceDesigner.cs
- NullExtension.cs
- DES.cs
- WebBrowserEvent.cs
- TraversalRequest.cs
- ResourceDescriptionAttribute.cs
- WeakRefEnumerator.cs
- ColumnResizeUndoUnit.cs
- XPathNavigator.cs
- Compiler.cs
- VersionPair.cs
- UserControlParser.cs
- TextEffect.cs
- FileLevelControlBuilderAttribute.cs
- DataBindingList.cs
- RSAOAEPKeyExchangeDeformatter.cs
- HtmlTableCell.cs
- DocumentGridContextMenu.cs
- RenderTargetBitmap.cs
- ContactManager.cs
- Math.cs
- ErasingStroke.cs
- CommentAction.cs
- PropertyMapper.cs
- PeerNearMe.cs
- HttpWebResponse.cs
- HwndAppCommandInputProvider.cs
- RedirectionProxy.cs
- OleDbError.cs
- CodeIdentifiers.cs
- StateDesigner.Helpers.cs
- MachineKeyValidationConverter.cs
- XmlSchemaSimpleTypeRestriction.cs
- ConnectionStringsExpressionBuilder.cs
- DataGridSortCommandEventArgs.cs
- AsymmetricSecurityBindingElement.cs
- MailDefinition.cs
- SQLMembershipProvider.cs
- UrlAuthorizationModule.cs
- GridSplitterAutomationPeer.cs
- ParameterToken.cs
- TreeIterators.cs
- CodeParameterDeclarationExpression.cs
- PromptBuilder.cs
- DbExpressionVisitor_TResultType.cs
- HyperLinkStyle.cs
- ReflectTypeDescriptionProvider.cs
- Image.cs
- Crypto.cs
- GlobalizationAssembly.cs
- MouseDevice.cs
- ConfigurationElementCollection.cs