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
- StateMachineWorkflowInstance.cs
- ValidatedControlConverter.cs
- TimeSpanSecondsConverter.cs
- SafePEFileHandle.cs
- CodeTypeOfExpression.cs
- RegexFCD.cs
- TextMessageEncoder.cs
- Size.cs
- ThemeConfigurationDialog.cs
- DataStorage.cs
- MetadataUtilsSmi.cs
- MouseButtonEventArgs.cs
- CodeDOMUtility.cs
- HttpServerVarsCollection.cs
- OuterGlowBitmapEffect.cs
- TreeNodeMouseHoverEvent.cs
- ServiceReference.cs
- WebPartPersonalization.cs
- StateMachineWorkflowInstance.cs
- Axis.cs
- DoubleAnimationUsingKeyFrames.cs
- RedirectionProxy.cs
- NaturalLanguageHyphenator.cs
- LookupBindingPropertiesAttribute.cs
- SchemaImporterExtensionElement.cs
- NamespaceListProperty.cs
- RenderingBiasValidation.cs
- OuterGlowBitmapEffect.cs
- ProgressBarRenderer.cs
- Directory.cs
- UInt64Storage.cs
- AuthenticationConfig.cs
- HttpTransportSecurity.cs
- ConfigUtil.cs
- DataGridViewLayoutData.cs
- LinkAreaEditor.cs
- Compiler.cs
- TextEditorThreadLocalStore.cs
- CachingHintValidation.cs
- Margins.cs
- DropShadowBitmapEffect.cs
- DesignerActionVerbList.cs
- _TimerThread.cs
- Page.cs
- VersionPair.cs
- SystemDiagnosticsSection.cs
- ClientCultureInfo.cs
- ToolStripButton.cs
- Int32CAMarshaler.cs
- TabItemWrapperAutomationPeer.cs
- DocumentGridPage.cs
- SigningCredentials.cs
- Debugger.cs
- RadioButton.cs
- LinqDataSourceContextEventArgs.cs
- FreezableCollection.cs
- Misc.cs
- BamlStream.cs
- SafeNativeMethods.cs
- EditorOptionAttribute.cs
- TypePresenter.xaml.cs
- StyleSheet.cs
- PriorityQueue.cs
- BezierSegment.cs
- XmlMemberMapping.cs
- ProxyElement.cs
- ProfilePropertySettingsCollection.cs
- FilteredSchemaElementLookUpTable.cs
- HandlerBase.cs
- Rfc2898DeriveBytes.cs
- Image.cs
- AppDomain.cs
- InheritanceContextHelper.cs
- ResourceAssociationSetEnd.cs
- WeakReferenceList.cs
- WebPartUserCapability.cs
- RevocationPoint.cs
- DescendantOverDescendantQuery.cs
- SettingsPropertyCollection.cs
- WindowsTokenRoleProvider.cs
- HttpCapabilitiesEvaluator.cs
- DateTimeOffsetStorage.cs
- AssemblySettingAttributes.cs
- ObjectReaderCompiler.cs
- WebPartMinimizeVerb.cs
- Base64Encoding.cs
- DateTimeParse.cs
- FontStyles.cs
- ActivityXRefPropertyEditor.cs
- PromptEventArgs.cs
- Bidi.cs
- XmlnsCache.cs
- TextPenaltyModule.cs
- DependencyPropertyChangedEventArgs.cs
- PathGeometry.cs
- SmtpLoginAuthenticationModule.cs
- QilIterator.cs
- ObjectCloneHelper.cs
- DbInsertCommandTree.cs
- CommonGetThemePartSize.cs