Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- MarkedHighlightComponent.cs
- RelationshipEndMember.cs
- StylusButtonCollection.cs
- DynamicValidatorEventArgs.cs
- AdjustableArrowCap.cs
- EventHandlerService.cs
- QuaternionRotation3D.cs
- ModelUtilities.cs
- DropDownButton.cs
- HttpAsyncResult.cs
- DataView.cs
- WpfXamlMember.cs
- StringReader.cs
- SelectionManager.cs
- TaiwanLunisolarCalendar.cs
- xdrvalidator.cs
- SubtreeProcessor.cs
- SchemaType.cs
- EntityDataSourceMemberPath.cs
- ParseChildrenAsPropertiesAttribute.cs
- CalendarDay.cs
- QueueProcessor.cs
- CannotUnloadAppDomainException.cs
- ShutDownListener.cs
- CollectionView.cs
- SmtpAuthenticationManager.cs
- CalloutQueueItem.cs
- HtmlTitle.cs
- KeyboardNavigation.cs
- RichTextBox.cs
- StateWorkerRequest.cs
- TimelineGroup.cs
- PageStatePersister.cs
- StorageTypeMapping.cs
- ProcessModelSection.cs
- WebPartMovingEventArgs.cs
- Constant.cs
- httpapplicationstate.cs
- ScriptServiceAttribute.cs
- RelationshipConverter.cs
- RelationshipNavigation.cs
- HttpCacheVary.cs
- diagnosticsswitches.cs
- ApplicationInfo.cs
- ReferencedCollectionType.cs
- PersistenceTypeAttribute.cs
- QueryContinueDragEvent.cs
- TemplatePagerField.cs
- SupportsEventValidationAttribute.cs
- BamlCollectionHolder.cs
- PowerStatus.cs
- __Error.cs
- DeflateEmulationStream.cs
- ScriptHandlerFactory.cs
- DataAdapter.cs
- EllipticalNodeOperations.cs
- StringDictionary.cs
- securitycriticaldataClass.cs
- PublishLicense.cs
- BitmapEffectInputConnector.cs
- TimeSpanStorage.cs
- ExpandCollapseProviderWrapper.cs
- ServiceModelActivity.cs
- DataRowView.cs
- StrokeRenderer.cs
- ConfigurationSettings.cs
- JavascriptCallbackBehaviorAttribute.cs
- Brushes.cs
- RTLAwareMessageBox.cs
- BindingsCollection.cs
- RequestCacheEntry.cs
- PageAsyncTaskManager.cs
- PropertyGridView.cs
- ViewGenResults.cs
- PreviewPrintController.cs
- OdbcConnectionStringbuilder.cs
- ByteKeyFrameCollection.cs
- ComponentFactoryHelpers.cs
- UnsafeNativeMethodsCLR.cs
- XmlSchemaObjectCollection.cs
- CoreChannel.cs
- NamespaceDecl.cs
- GrammarBuilderDictation.cs
- NonVisualControlAttribute.cs
- WebSysDescriptionAttribute.cs
- SeparatorAutomationPeer.cs
- SharedStatics.cs
- ProjectedWrapper.cs
- HMACSHA512.cs
- Quad.cs
- HandleRef.cs
- NativeBuffer.cs
- FlowchartSizeFeature.cs
- SqlDataSourceCustomCommandEditor.cs
- CalendarItem.cs
- CommandDesigner.cs
- WebPartTracker.cs
- X509PeerCertificateElement.cs
- DataSourceProvider.cs
- OracleConnectionString.cs