Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / Configuration / HostingEnvironmentSection.cs / 1 / 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
- ListenerHandler.cs
- Deserializer.cs
- TextDecorationLocationValidation.cs
- TextFormatterHost.cs
- XmlIlGenerator.cs
- SizeConverter.cs
- DataGridViewEditingControlShowingEventArgs.cs
- CustomCredentialPolicy.cs
- XmlConvert.cs
- RuntimeHelpers.cs
- ResXResourceReader.cs
- WorkflowInstance.cs
- TypeExtensionSerializer.cs
- DataGridParentRows.cs
- VBIdentifierDesigner.xaml.cs
- CapabilitiesRule.cs
- X509RecipientCertificateServiceElement.cs
- HandlerFactoryWrapper.cs
- XmlSchemaChoice.cs
- ProvidePropertyAttribute.cs
- SessionStateUtil.cs
- SHA384.cs
- XmlNamespaceMappingCollection.cs
- XhtmlBasicLabelAdapter.cs
- HttpListener.cs
- HttpRuntimeSection.cs
- FragmentQueryProcessor.cs
- IdentityReference.cs
- TerminatorSinks.cs
- MethodCallExpression.cs
- DigitShape.cs
- StructuralComparisons.cs
- HotSpotCollection.cs
- NativeMethods.cs
- Function.cs
- TrackingProfileDeserializationException.cs
- DataGridViewRowPostPaintEventArgs.cs
- FilterException.cs
- JsonServiceDocumentSerializer.cs
- HuffmanTree.cs
- XmlQueryTypeFactory.cs
- DrawingImage.cs
- SessionStateContainer.cs
- Lease.cs
- XsltInput.cs
- RemoteCryptoRsaServiceProvider.cs
- Function.cs
- PhysicalFontFamily.cs
- CategoryAttribute.cs
- UriGenerator.cs
- SerializationSectionGroup.cs
- BinaryEditor.cs
- PathSegment.cs
- FormsAuthenticationConfiguration.cs
- OdbcConnectionString.cs
- EditorZone.cs
- FormsAuthenticationEventArgs.cs
- TypeDependencyAttribute.cs
- SQlBooleanStorage.cs
- Profiler.cs
- BulletDecorator.cs
- EnumConverter.cs
- CqlParserHelpers.cs
- BufferedStream.cs
- ResourceCodeDomSerializer.cs
- HighlightComponent.cs
- TreeViewItemAutomationPeer.cs
- TableItemProviderWrapper.cs
- ComAdminWrapper.cs
- VariableAction.cs
- StreamSecurityUpgradeAcceptorAsyncResult.cs
- FileStream.cs
- DataServiceEntityAttribute.cs
- ContentIterators.cs
- NativeCompoundFileAPIs.cs
- EditorZone.cs
- LicenseException.cs
- SecureStringHasher.cs
- DataGridParentRows.cs
- SQLCharsStorage.cs
- DocumentAutomationPeer.cs
- EngineSite.cs
- DataPagerFieldCommandEventArgs.cs
- BamlWriter.cs
- StringUtil.cs
- BinaryMessageFormatter.cs
- DecoderExceptionFallback.cs
- UnsafeNativeMethods.cs
- BuildManagerHost.cs
- EmptyControlCollection.cs
- XmlLanguageConverter.cs
- ParameterSubsegment.cs
- ManagementObject.cs
- BindingCompleteEventArgs.cs
- LogArchiveSnapshot.cs
- ApplicationFileParser.cs
- ButtonBaseAutomationPeer.cs
- TTSEngineProxy.cs
- ContentElement.cs
- JsonXmlDataContract.cs