Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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); */ } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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); */ } } // 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
- ProtocolViolationException.cs
- StructuredProperty.cs
- DataListCommandEventArgs.cs
- InvalidOleVariantTypeException.cs
- HMACRIPEMD160.cs
- CharacterString.cs
- QilNode.cs
- EqualityComparer.cs
- LinearGradientBrush.cs
- DeclaredTypeValidator.cs
- TreeNodeBindingCollection.cs
- SaveFileDialog.cs
- RichTextBoxAutomationPeer.cs
- DbExpressionRules.cs
- OutOfProcStateClientManager.cs
- FigureParaClient.cs
- JsonMessageEncoderFactory.cs
- GlyphRunDrawing.cs
- ExpressionEditorAttribute.cs
- PolicyVersion.cs
- RenderDataDrawingContext.cs
- AbstractExpressions.cs
- _AutoWebProxyScriptWrapper.cs
- TextTreeTextBlock.cs
- ModelProperty.cs
- GeometryHitTestParameters.cs
- HtmlLabelAdapter.cs
- TextServicesDisplayAttributePropertyRanges.cs
- SafeBitVector32.cs
- EntityDataSourceViewSchema.cs
- OpenTypeCommon.cs
- OleDbEnumerator.cs
- WorkflowInstance.cs
- DocumentAutomationPeer.cs
- SafeFileMapViewHandle.cs
- PackWebRequest.cs
- UIAgentMonitorHandle.cs
- StreamResourceInfo.cs
- DrawingGroupDrawingContext.cs
- DesignerResources.cs
- GeneralTransform.cs
- namescope.cs
- StringStorage.cs
- FilterElement.cs
- XamlRtfConverter.cs
- ValidationErrorEventArgs.cs
- XmlReturnWriter.cs
- DelegatingTypeDescriptionProvider.cs
- ECDiffieHellmanCngPublicKey.cs
- coordinatorfactory.cs
- NotSupportedException.cs
- AccessibilityHelperForVista.cs
- HtmlUtf8RawTextWriter.cs
- Membership.cs
- SqlBooleanizer.cs
- ImageCreator.cs
- DetailsViewDeleteEventArgs.cs
- CollectionViewGroup.cs
- TileBrush.cs
- DetailsViewCommandEventArgs.cs
- ImageCodecInfo.cs
- Tokenizer.cs
- ChooseAction.cs
- ProgressChangedEventArgs.cs
- FileResponseElement.cs
- CodeStatementCollection.cs
- StatusBarPanel.cs
- TTSEvent.cs
- Properties.cs
- ReadOnlyDataSource.cs
- ColorConvertedBitmap.cs
- CryptoSession.cs
- AliasedExpr.cs
- MetadataPropertyAttribute.cs
- AccessedThroughPropertyAttribute.cs
- ActivityExecutor.cs
- VScrollBar.cs
- InputMethodStateTypeInfo.cs
- UniqueConstraint.cs
- TextBounds.cs
- ParseNumbers.cs
- CommentEmitter.cs
- MimeMultiPart.cs
- NamespaceCollection.cs
- AttributeCollection.cs
- CollectionChangedEventManager.cs
- WinInetCache.cs
- ElementUtil.cs
- EdmProviderManifest.cs
- IriParsingElement.cs
- UnsafeNativeMethods.cs
- MasterPage.cs
- WebPartCatalogAddVerb.cs
- Decoder.cs
- DomainUpDown.cs
- SerializableTypeCodeDomSerializer.cs
- CodeCatchClauseCollection.cs
- CodeTypeReferenceCollection.cs
- ProxyAssemblyNotLoadedException.cs
- BufferBuilder.cs