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
- Parameter.cs
- FixedSOMFixedBlock.cs
- AsnEncodedData.cs
- EventListener.cs
- ParameterBinding.cs
- EventArgs.cs
- VScrollBar.cs
- FormsAuthenticationCredentials.cs
- Point3DValueSerializer.cs
- Permission.cs
- WebPartTransformerAttribute.cs
- ValidationHelper.cs
- QueryNode.cs
- HtmlEncodedRawTextWriter.cs
- X509Certificate.cs
- LoginView.cs
- WpfXamlLoader.cs
- CompiledRegexRunnerFactory.cs
- SiteMapNodeCollection.cs
- RequestSecurityTokenResponse.cs
- GenericAuthenticationEventArgs.cs
- TdsRecordBufferSetter.cs
- SqlCharStream.cs
- KnownAssembliesSet.cs
- ReadonlyMessageFilter.cs
- DataFieldConverter.cs
- ReaderContextStackData.cs
- SHA512Cng.cs
- ThreadBehavior.cs
- DataBoundControlHelper.cs
- CookieParameter.cs
- IndexOutOfRangeException.cs
- Point.cs
- CategoryNameCollection.cs
- OrderedDictionaryStateHelper.cs
- IISMapPath.cs
- ConfigurationStrings.cs
- ColorTransformHelper.cs
- CurrentChangingEventArgs.cs
- latinshape.cs
- DataContractSerializer.cs
- XMLUtil.cs
- XmlReflectionImporter.cs
- OracleRowUpdatingEventArgs.cs
- IndexedEnumerable.cs
- XmlSchemaElement.cs
- SystemIcmpV4Statistics.cs
- DelegatingConfigHost.cs
- ItemAutomationPeer.cs
- GeometryGroup.cs
- BasicViewGenerator.cs
- DbConnectionOptions.cs
- MediaCommands.cs
- ProxyWebPartManager.cs
- AutomationPatternInfo.cs
- PenCursorManager.cs
- TdsParserStaticMethods.cs
- AndCondition.cs
- WasAdminWrapper.cs
- HTMLTextWriter.cs
- PackageRelationshipSelector.cs
- ReadOnlyDataSourceView.cs
- RadioButtonStandardAdapter.cs
- MessageParameterAttribute.cs
- PseudoWebRequest.cs
- DecimalAnimation.cs
- TypeConvertions.cs
- Calendar.cs
- ServiceModelSectionGroup.cs
- SQLByteStorage.cs
- LicenseProviderAttribute.cs
- DurableErrorHandler.cs
- SignerInfo.cs
- BitStream.cs
- BrowserCapabilitiesCompiler.cs
- NullableIntMinMaxAggregationOperator.cs
- ConfigErrorGlyph.cs
- MasterPageParser.cs
- RootProfilePropertySettingsCollection.cs
- ButtonAutomationPeer.cs
- ComplexLine.cs
- MemoryFailPoint.cs
- ProcessThreadCollection.cs
- SemanticBasicElement.cs
- ClrProviderManifest.cs
- ProcessModuleDesigner.cs
- SiteMapNodeItemEventArgs.cs
- PreservationFileWriter.cs
- RegexFCD.cs
- ConfigurationStrings.cs
- CommentEmitter.cs
- MatchNoneMessageFilter.cs
- CodeComment.cs
- PropertyFilterAttribute.cs
- InfoCardKeyedHashAlgorithm.cs
- ConfigXmlAttribute.cs
- DataTableReader.cs
- WindowsTokenRoleProvider.cs
- OutputCacheSection.cs
- addressfiltermode.cs