Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / 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. //------------------------------------------------------------------------------ // // 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
- TextServicesPropertyRanges.cs
- ConstNode.cs
- DrawingCollection.cs
- ByteArrayHelperWithString.cs
- MachineSettingsSection.cs
- IDictionary.cs
- SharedUtils.cs
- DataGridViewRowStateChangedEventArgs.cs
- PrinterResolution.cs
- DataMemberListEditor.cs
- RSAPKCS1SignatureDeformatter.cs
- QueryCacheManager.cs
- StorageTypeMapping.cs
- PointConverter.cs
- ActivityDesignerLayoutSerializers.cs
- CanonicalizationDriver.cs
- HitTestWithGeometryDrawingContextWalker.cs
- DecimalFormatter.cs
- SQLMoneyStorage.cs
- ClientData.cs
- SplitterPanel.cs
- X509Certificate.cs
- Ref.cs
- InternalResources.cs
- WizardPanel.cs
- WpfPayload.cs
- ProgressiveCrcCalculatingStream.cs
- SkipQueryOptionExpression.cs
- SparseMemoryStream.cs
- ItemCheckedEvent.cs
- TrackingQuery.cs
- UserNamePasswordValidator.cs
- Base64Decoder.cs
- ApplicationDirectoryMembershipCondition.cs
- UIntPtr.cs
- UserControl.cs
- MethodBody.cs
- ReceiveSecurityHeaderEntry.cs
- PageRequestManager.cs
- BaseDataList.cs
- ThemeInfoAttribute.cs
- SQLByteStorage.cs
- HttpHandler.cs
- DataExpression.cs
- ControlPager.cs
- IOException.cs
- _ConnectStream.cs
- ProtocolReflector.cs
- Trace.cs
- RecognizerStateChangedEventArgs.cs
- DbConnectionPoolOptions.cs
- EndPoint.cs
- ReceiveSecurityHeaderElementManager.cs
- EntityContainerEmitter.cs
- DesignerDataTableBase.cs
- DoubleCollection.cs
- XMLDiffLoader.cs
- SignatureGenerator.cs
- CommandDevice.cs
- CornerRadius.cs
- InternalRelationshipCollection.cs
- ClipboardProcessor.cs
- RulePatternOps.cs
- HttpProfileGroupBase.cs
- WorkflowApplicationIdleEventArgs.cs
- RuntimeHelpers.cs
- WebPartDescription.cs
- SafeCancelMibChangeNotify.cs
- CodeTypeReference.cs
- ToolStripLabel.cs
- HMACSHA1.cs
- DataBinder.cs
- CodePageUtils.cs
- BidPrivateBase.cs
- ObjectSet.cs
- ScriptingJsonSerializationSection.cs
- AvTraceDetails.cs
- XmlSchemaComplexType.cs
- TemplateKeyConverter.cs
- ImageIndexConverter.cs
- ListBase.cs
- ButtonFlatAdapter.cs
- DllNotFoundException.cs
- ServiceModelExtensionElement.cs
- ViewEvent.cs
- Storyboard.cs
- WebBrowserUriTypeConverter.cs
- ipaddressinformationcollection.cs
- SqlCacheDependency.cs
- DbgUtil.cs
- ISFTagAndGuidCache.cs
- CompilerParameters.cs
- bindurihelper.cs
- SqlUserDefinedTypeAttribute.cs
- XamlRtfConverter.cs
- WhiteSpaceTrimStringConverter.cs
- HtmlTernaryTree.cs
- SqlXml.cs
- ItemMap.cs
- FunctionQuery.cs