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
- CursorConverter.cs
- AutomationIdentifier.cs
- ThemeDictionaryExtension.cs
- FilterQueryOptionExpression.cs
- State.cs
- LocatorBase.cs
- AssignDesigner.xaml.cs
- PageContentCollection.cs
- SubtreeProcessor.cs
- PermissionToken.cs
- RegexWriter.cs
- PagerSettings.cs
- WorkflowInstanceQuery.cs
- LogEntryUtils.cs
- SqlConnectionPoolProviderInfo.cs
- Misc.cs
- OptimisticConcurrencyException.cs
- QuaternionConverter.cs
- DataRow.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- GuidConverter.cs
- ConfigXmlCDataSection.cs
- CompiledQuery.cs
- DirectionalLight.cs
- UInt32Converter.cs
- GeneralTransform2DTo3DTo2D.cs
- DesignerForm.cs
- COMException.cs
- DSASignatureDeformatter.cs
- Publisher.cs
- NullReferenceException.cs
- NativeMethods.cs
- CatalogPartCollection.cs
- Point4D.cs
- TextTreeExtractElementUndoUnit.cs
- MultiSelectRootGridEntry.cs
- ConnectionStringsExpressionEditor.cs
- TableLayoutCellPaintEventArgs.cs
- BitConverter.cs
- UnsafeNativeMethods.cs
- ChangePassword.cs
- CatalogPartChrome.cs
- Validator.cs
- AccessViolationException.cs
- GradientStop.cs
- Operand.cs
- Automation.cs
- ServiceInstallComponent.cs
- ListViewTableCell.cs
- TrustManagerMoreInformation.cs
- CodeChecksumPragma.cs
- ParameterDataSourceExpression.cs
- HttpProcessUtility.cs
- FormatVersion.cs
- TextRangeAdaptor.cs
- DbBuffer.cs
- UserPersonalizationStateInfo.cs
- ControlIdConverter.cs
- QuotedPrintableStream.cs
- ToolStripDropDown.cs
- TextBox.cs
- ObjectItemLoadingSessionData.cs
- TransactionScopeDesigner.cs
- WindowsGraphicsWrapper.cs
- ParseNumbers.cs
- SafeCloseHandleCritical.cs
- WebPartDescriptionCollection.cs
- ItemsControlAutomationPeer.cs
- BitmapEffectDrawingContextWalker.cs
- AdditionalEntityFunctions.cs
- ButtonFlatAdapter.cs
- PointCollection.cs
- XmlSchemaParticle.cs
- _ListenerResponseStream.cs
- ArcSegment.cs
- WebConfigurationManager.cs
- HttpModuleActionCollection.cs
- DbException.cs
- COM2PropertyBuilderUITypeEditor.cs
- ContentPathSegment.cs
- Int32CAMarshaler.cs
- QilParameter.cs
- DesignerActionKeyboardBehavior.cs
- ConfigurationFileMap.cs
- GridViewCellAutomationPeer.cs
- ExpressionBuilder.cs
- DataGridViewComboBoxColumn.cs
- TextEditorCharacters.cs
- Substitution.cs
- Quaternion.cs
- OutputScope.cs
- _UriTypeConverter.cs
- httpstaticobjectscollection.cs
- SqlDataReaderSmi.cs
- LogSwitch.cs
- WebPermission.cs
- TreeChangeInfo.cs
- COM2PropertyDescriptor.cs
- _FtpControlStream.cs
- SqlUtils.cs