Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Configuration / WebProxyScriptElement.cs / 1 / WebProxyScriptElement.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Configuration { using System; using System.Configuration; using System.Security.Permissions; public sealed class WebProxyScriptElement : ConfigurationElement { public WebProxyScriptElement() { this.properties.Add(this.downloadTimeout); /* Not used with Managed JScript this.properties.Add(this.executionTimeout); */ } protected override void PostDeserialize() { // Perf optimization. If the configuration is coming from machine.config // It is safe and we don't need to check for permissions. if (EvaluationContext.IsMachineLevel) return; try { ExceptionHelper.WebPermissionUnrestricted.Demand(); } catch (Exception exception) { throw new ConfigurationErrorsException( SR.GetString(SR.net_config_element_permission, ConfigurationStrings.WebProxyScript), exception); } } [ConfigurationProperty(ConfigurationStrings.DownloadTimeout, DefaultValue = "00:02:00")] public TimeSpan DownloadTimeout { get { return (TimeSpan) this[this.downloadTimeout]; } set { this[this.downloadTimeout] = value; } } /* Not used with Managed JScript [ConfigurationProperty(ConfigurationStrings.ExecutionTimeout, DefaultValue = "00:00:05")] public TimeSpan ExecutionTimeout { get { return (TimeSpan) this[this.executionTimeout]; } set { this[this.executionTimeout] = value; } } */ protected override ConfigurationPropertyCollection Properties { get { return this.properties; } } ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); readonly ConfigurationProperty downloadTimeout = new ConfigurationProperty(ConfigurationStrings.DownloadTimeout, typeof(TimeSpan), TimeSpan.FromMinutes(1), ConfigurationPropertyOptions.None); /* Not used with Managed JScript readonly ConfigurationProperty executionTimeout = new ConfigurationProperty(ConfigurationStrings.ExecutionTimeout, typeof(TimeSpan), TimeSpan.FromSeconds(5), ConfigurationPropertyOptions.None); */ } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ParameterCollection.cs
- CalendarDay.cs
- latinshape.cs
- TextEditorContextMenu.cs
- WebErrorHandler.cs
- SettingsContext.cs
- ToolboxItemFilterAttribute.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- PanelStyle.cs
- PageThemeCodeDomTreeGenerator.cs
- WorkflowApplicationAbortedEventArgs.cs
- CombinedGeometry.cs
- ResourcePart.cs
- Nullable.cs
- FeatureSupport.cs
- Hyperlink.cs
- EditingMode.cs
- SaveFileDialog.cs
- InfocardClientCredentials.cs
- GrammarBuilderPhrase.cs
- DbUpdateCommandTree.cs
- ToolStripMenuItem.cs
- WebConfigurationManager.cs
- EventHandlerList.cs
- XmlCDATASection.cs
- PropertyNames.cs
- BaseParagraph.cs
- CompositeDataBoundControl.cs
- TimelineGroup.cs
- SystemIcons.cs
- SchemaImporterExtensionElementCollection.cs
- StrokeRenderer.cs
- HttpTransportElement.cs
- BoolExpression.cs
- TableLayoutPanelCellPosition.cs
- X509CertificateValidator.cs
- ColorMatrix.cs
- SqlGenericUtil.cs
- CapabilitiesUse.cs
- InfiniteTimeSpanConverter.cs
- WebServiceErrorEvent.cs
- SiteMapSection.cs
- PointUtil.cs
- OverrideMode.cs
- GridLengthConverter.cs
- TimeSpanSecondsConverter.cs
- SignedXml.cs
- ApplicationProxyInternal.cs
- ErasingStroke.cs
- DataGridViewCellCancelEventArgs.cs
- SystemDropShadowChrome.cs
- StringReader.cs
- DefaultCompensation.cs
- ControlEvent.cs
- LinkButton.cs
- ArgumentOutOfRangeException.cs
- HebrewNumber.cs
- SurrogateSelector.cs
- ZoneMembershipCondition.cs
- keycontainerpermission.cs
- ClientTargetSection.cs
- DbConnectionPoolIdentity.cs
- StringHelper.cs
- XmlTextWriter.cs
- OciHandle.cs
- XmlObjectSerializerContext.cs
- SqlDeflator.cs
- GregorianCalendarHelper.cs
- ErrorStyle.cs
- Point3DAnimationBase.cs
- RequiredFieldValidator.cs
- GridItemProviderWrapper.cs
- ProtocolsConfiguration.cs
- SafeHandles.cs
- SchemaImporterExtensionElementCollection.cs
- SimpleExpression.cs
- StdRegProviderWrapper.cs
- PolyQuadraticBezierSegment.cs
- ReadOnlyDictionary.cs
- XmlExceptionHelper.cs
- RecordBuilder.cs
- LicenseProviderAttribute.cs
- BinaryFormatter.cs
- WeakHashtable.cs
- OdbcCommand.cs
- EventHandlersStore.cs
- DbParameterCollectionHelper.cs
- SynchronizedPool.cs
- UInt16Converter.cs
- HtmlElementCollection.cs
- DispatcherExceptionEventArgs.cs
- XmlNamespaceMappingCollection.cs
- AuthenticationServiceManager.cs
- StrokeNodeOperations2.cs
- PriorityRange.cs
- AppDomainAttributes.cs
- TimersDescriptionAttribute.cs
- ClientTargetCollection.cs
- PtsPage.cs
- PrimitiveType.cs