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
- FixedTextContainer.cs
- ObjectStateManagerMetadata.cs
- HandlerBase.cs
- SerializationStore.cs
- CodeCatchClause.cs
- HtmlControlPersistable.cs
- BitmapEffectDrawingContextWalker.cs
- CommittableTransaction.cs
- RawUIStateInputReport.cs
- ReadOnlyMetadataCollection.cs
- SimpleTypeResolver.cs
- BCLDebug.cs
- diagnosticsswitches.cs
- PtsCache.cs
- MethodCallTranslator.cs
- X509CertificateValidator.cs
- TextEvent.cs
- VisualCollection.cs
- PointCollectionConverter.cs
- PreviewKeyDownEventArgs.cs
- ImmutableClientRuntime.cs
- Base64Encoder.cs
- Column.cs
- Point3DCollection.cs
- DataControlButton.cs
- CompositeKey.cs
- PrtTicket_Base.cs
- DesignerTransactionCloseEvent.cs
- SizeChangedInfo.cs
- __FastResourceComparer.cs
- PrimarySelectionAdorner.cs
- Vector3D.cs
- IChannel.cs
- Visual3D.cs
- WebPartRestoreVerb.cs
- DbProviderFactoriesConfigurationHandler.cs
- Rect.cs
- DataGridViewRowHeaderCell.cs
- SynchronizedDispatch.cs
- GPPOINT.cs
- TreeNodeStyleCollection.cs
- SizeAnimationClockResource.cs
- ToolStripPanel.cs
- HttpHandlerAction.cs
- GeneralTransformGroup.cs
- EnumConverter.cs
- SQLString.cs
- Base64WriteStateInfo.cs
- InkCanvas.cs
- ProfileService.cs
- RootBrowserWindowAutomationPeer.cs
- RevocationPoint.cs
- ImageField.cs
- ElementsClipboardData.cs
- BufferedGraphicsContext.cs
- RepeaterCommandEventArgs.cs
- XmlIlVisitor.cs
- StrongNameIdentityPermission.cs
- EventLogConfiguration.cs
- PrintControllerWithStatusDialog.cs
- XamlSerializerUtil.cs
- TdsParserSafeHandles.cs
- OutOfMemoryException.cs
- LocalValueEnumerator.cs
- Exception.cs
- ColorConvertedBitmap.cs
- SecurityRuntime.cs
- PropertyChangingEventArgs.cs
- SqlGenericUtil.cs
- PageWrapper.cs
- PermissionRequestEvidence.cs
- QuaternionValueSerializer.cs
- DeclarativeCatalogPartDesigner.cs
- SchemaNamespaceManager.cs
- Attributes.cs
- EmbeddedObject.cs
- CellIdBoolean.cs
- ButtonAutomationPeer.cs
- PropertyGrid.cs
- ProgressBar.cs
- SecurityKeyIdentifierClause.cs
- ServiceContractViewControl.cs
- SqlConnectionFactory.cs
- OperationCanceledException.cs
- ImageAnimator.cs
- ListViewUpdatedEventArgs.cs
- Send.cs
- Scheduler.cs
- ParameterCollectionEditorForm.cs
- MetadataArtifactLoaderCompositeFile.cs
- StateManagedCollection.cs
- RowUpdatedEventArgs.cs
- TextComposition.cs
- MetadataArtifactLoaderResource.cs
- DeleteIndexBinder.cs
- SoapObjectReader.cs
- FormatSettings.cs
- EventProperty.cs
- ConnectionStringsExpressionBuilder.cs
- CacheForPrimitiveTypes.cs