Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Configuration / WebProxyScriptElement.cs / 1305376 / 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:01: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), null, new TimeSpanValidator(new TimeSpan(0, 0, 0), TimeSpan.MaxValue, false), ConfigurationPropertyOptions.None); /* Not used with Managed JScript readonly ConfigurationProperty executionTimeout = new ConfigurationProperty(ConfigurationStrings.ExecutionTimeout, typeof(TimeSpan), TimeSpan.FromSeconds(5), ConfigurationPropertyOptions.None); */ } } // 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
- ManipulationStartedEventArgs.cs
- DataRecordObjectView.cs
- EdmFunction.cs
- ApplicationHost.cs
- WebReferencesBuildProvider.cs
- FormViewRow.cs
- FileDialogCustomPlaces.cs
- ResizeGrip.cs
- ImageCodecInfoPrivate.cs
- MsmqProcessProtocolHandler.cs
- UnicastIPAddressInformationCollection.cs
- SaveFileDialog.cs
- BufferModeSettings.cs
- ActivityPreviewDesigner.cs
- CodeNamespace.cs
- DataGridViewRowCollection.cs
- AsyncPostBackErrorEventArgs.cs
- MemberPathMap.cs
- PinnedBufferMemoryStream.cs
- RepeaterItem.cs
- ProxyAttribute.cs
- HtmlControlPersistable.cs
- ExternalFile.cs
- Debug.cs
- SqlParameterizer.cs
- SecurityContextSecurityTokenAuthenticator.cs
- SecurityTokenProvider.cs
- TabControlAutomationPeer.cs
- DocumentPage.cs
- UIElementParagraph.cs
- RenderData.cs
- InkPresenter.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DataControlFieldCollection.cs
- ServiceBusyException.cs
- BinaryMethodMessage.cs
- FlowDocumentPage.cs
- Int64Storage.cs
- DrawItemEvent.cs
- EnglishPluralizationService.cs
- BaseDataListComponentEditor.cs
- XmlReflectionMember.cs
- Point.cs
- KnownBoxes.cs
- DataGridViewCellMouseEventArgs.cs
- CollectionViewSource.cs
- ExpressionBuilderCollection.cs
- AsymmetricKeyExchangeFormatter.cs
- TransportManager.cs
- BaseDataListComponentEditor.cs
- PageThemeBuildProvider.cs
- AddInSegmentDirectoryNotFoundException.cs
- BitStream.cs
- DecoderExceptionFallback.cs
- TextViewSelectionProcessor.cs
- BitmapEffectInput.cs
- RemoveStoryboard.cs
- EdmItemError.cs
- ProviderUtil.cs
- OdbcStatementHandle.cs
- DependencyPropertyKey.cs
- SortQueryOperator.cs
- GrammarBuilderDictation.cs
- InvalidPropValue.cs
- TheQuery.cs
- FacetChecker.cs
- OpenFileDialog.cs
- NonParentingControl.cs
- ServiceBuildProvider.cs
- CryptoHandle.cs
- ValueTypeFixupInfo.cs
- PinnedBufferMemoryStream.cs
- ScrollPattern.cs
- RotateTransform.cs
- LessThanOrEqual.cs
- TdsRecordBufferSetter.cs
- IndependentlyAnimatedPropertyMetadata.cs
- CheckBoxField.cs
- Publisher.cs
- ReadOnlyMetadataCollection.cs
- NativeMethods.cs
- TypeSystem.cs
- HwndKeyboardInputProvider.cs
- SpeechAudioFormatInfo.cs
- EntityTypeEmitter.cs
- SharedPersonalizationStateInfo.cs
- WindowsTokenRoleProvider.cs
- DataDocumentXPathNavigator.cs
- UrlPath.cs
- CharAnimationUsingKeyFrames.cs
- StringAnimationUsingKeyFrames.cs
- EqualityArray.cs
- AsyncStreamReader.cs
- EventRoute.cs
- BoolLiteral.cs
- PageAdapter.cs
- TcpProcessProtocolHandler.cs
- DataServiceHostFactory.cs
- Accessible.cs
- DebugView.cs