Code:
/ FX-1434 / FX-1434 / 1.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
- CalendarSelectionChangedEventArgs.cs
- JavaScriptSerializer.cs
- TextRangeBase.cs
- ByteAnimation.cs
- Floater.cs
- Script.cs
- InheritanceRules.cs
- SchemaImporterExtension.cs
- EllipticalNodeOperations.cs
- StorageComplexTypeMapping.cs
- DispatchChannelSink.cs
- ModelUIElement3D.cs
- UsernameTokenFactoryCredential.cs
- InvokePatternIdentifiers.cs
- HtmlGenericControl.cs
- Button.cs
- XamlPointCollectionSerializer.cs
- TextServicesManager.cs
- ValidationHelpers.cs
- ExtentJoinTreeNode.cs
- GeneralTransformCollection.cs
- CollectionAdapters.cs
- UpdateManifestForBrowserApplication.cs
- StaticTextPointer.cs
- BufferedWebEventProvider.cs
- CodeTypeReferenceCollection.cs
- PackageFilter.cs
- BuiltInExpr.cs
- CompilerInfo.cs
- RijndaelCryptoServiceProvider.cs
- DbExpressionBuilder.cs
- ToolboxItemSnapLineBehavior.cs
- PageTheme.cs
- DrawingAttributeSerializer.cs
- IPHostEntry.cs
- ValidationErrorCollection.cs
- TemplateControlBuildProvider.cs
- BorderGapMaskConverter.cs
- DetailsViewDeleteEventArgs.cs
- QueryStringParameter.cs
- ImportCatalogPart.cs
- RectangleF.cs
- FullTextState.cs
- SQLBinaryStorage.cs
- ClientScriptManager.cs
- SortExpressionBuilder.cs
- WebPartsSection.cs
- NumberFormatInfo.cs
- OperatorExpressions.cs
- ScrollContentPresenter.cs
- DictionaryMarkupSerializer.cs
- FontInfo.cs
- PointValueSerializer.cs
- WindowProviderWrapper.cs
- ManifestBasedResourceGroveler.cs
- OutputBuffer.cs
- XmlSubtreeReader.cs
- SoapProtocolImporter.cs
- XmlSerializerOperationFormatter.cs
- InlineObject.cs
- DataGridView.cs
- TimeSpanValidatorAttribute.cs
- LineMetrics.cs
- securestring.cs
- UIElementParaClient.cs
- ACL.cs
- MenuItem.cs
- ActivationArguments.cs
- ImageCodecInfoPrivate.cs
- LinqTreeNodeEvaluator.cs
- AttributeSetAction.cs
- ADMembershipUser.cs
- HitTestResult.cs
- DataContract.cs
- ExternalException.cs
- MatrixTransform.cs
- UpdateCommandGenerator.cs
- WebPartEditVerb.cs
- ProfileSettingsCollection.cs
- OleAutBinder.cs
- SqlMethodCallConverter.cs
- XmlILModule.cs
- Visual3DCollection.cs
- CardSpaceException.cs
- RawStylusInputReport.cs
- EdmProperty.cs
- DynamicDataExtensions.cs
- UIElementHelper.cs
- CalendarDesigner.cs
- ToolbarAUtomationPeer.cs
- CodeActivityContext.cs
- DocumentXmlWriter.cs
- StorageInfo.cs
- ListViewSortEventArgs.cs
- QueryProcessor.cs
- StrongNameUtility.cs
- StrictModeSecurityHeaderElementInferenceEngine.cs
- InfoCardArgumentException.cs
- MatrixValueSerializer.cs
- ToolStripPanelCell.cs