Code:
/ DotNET / DotNET / 8.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
- HttpDebugHandler.cs
- WorkflowOwnershipException.cs
- ValidationErrorEventArgs.cs
- ScaleTransform3D.cs
- NameValueConfigurationCollection.cs
- ScrollItemPattern.cs
- StandardCommands.cs
- TableLayoutCellPaintEventArgs.cs
- ProfileSection.cs
- UnsafeNativeMethods.cs
- SecurityTokenResolver.cs
- XmlILModule.cs
- LessThan.cs
- Main.cs
- NonSerializedAttribute.cs
- StylusPointProperties.cs
- KeyedHashAlgorithm.cs
- DataColumn.cs
- MulticastNotSupportedException.cs
- Point.cs
- ConstraintEnumerator.cs
- FixedFlowMap.cs
- XmlAnyElementAttributes.cs
- MouseBinding.cs
- SqlRemoveConstantOrderBy.cs
- StateMachineDesignerPaint.cs
- MonthCalendarDesigner.cs
- Font.cs
- AnnotationStore.cs
- AudioException.cs
- compensatingcollection.cs
- RoleService.cs
- IntellisenseTextBox.designer.cs
- XamlBrushSerializer.cs
- TypeConverterHelper.cs
- Utils.cs
- KeySpline.cs
- ChannelManager.cs
- xmlglyphRunInfo.cs
- ClientSideQueueItem.cs
- FormsAuthenticationEventArgs.cs
- UIElement3DAutomationPeer.cs
- AppDomainShutdownMonitor.cs
- DynamicValidator.cs
- DataGridViewTextBoxColumn.cs
- TextBox.cs
- Matrix3D.cs
- JsonReaderDelegator.cs
- DecoderFallbackWithFailureFlag.cs
- DataTrigger.cs
- WsdlInspector.cs
- Composition.cs
- Variable.cs
- SafeReversePInvokeHandle.cs
- CellIdBoolean.cs
- ProviderConnectionPointCollection.cs
- ADMembershipUser.cs
- VisualTransition.cs
- XmlKeywords.cs
- MinMaxParagraphWidth.cs
- ObjectStateManagerMetadata.cs
- BuildProviderAppliesToAttribute.cs
- RegexReplacement.cs
- CodeTypeMember.cs
- CatalogPart.cs
- ThreadAbortException.cs
- xmlsaver.cs
- ListenerConstants.cs
- UserControlAutomationPeer.cs
- HttpCapabilitiesBase.cs
- StackBuilderSink.cs
- ListControlStringCollectionEditor.cs
- EmptyEnumerator.cs
- InfoCardListRequest.cs
- HttpException.cs
- HostingPreferredMapPath.cs
- InvalidOperationException.cs
- EntityDataSourceStatementEditorForm.cs
- StringBlob.cs
- PopupRootAutomationPeer.cs
- OperatingSystem.cs
- LinkedDataMemberFieldEditor.cs
- DataGridItemCollection.cs
- SocketPermission.cs
- DataGridClipboardHelper.cs
- LeafCellTreeNode.cs
- ExtentKey.cs
- ChooseAction.cs
- QilUnary.cs
- WebPartChrome.cs
- HttpRawResponse.cs
- SectionUpdates.cs
- DataRecordObjectView.cs
- VirtualizingPanel.cs
- Timeline.cs
- DataRowIndexBuffer.cs
- ConnectionString.cs
- DescendantBaseQuery.cs
- ControlPropertyNameConverter.cs
- CompilationUtil.cs