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
- DataTableMappingCollection.cs
- PageContent.cs
- RuleRef.cs
- SignerInfo.cs
- XmlMtomWriter.cs
- DefaultValueTypeConverter.cs
- UnitySerializationHolder.cs
- SHA1CryptoServiceProvider.cs
- TextEncodedRawTextWriter.cs
- EpmSyndicationContentDeSerializer.cs
- ExpressionNormalizer.cs
- AuthenticationModuleElementCollection.cs
- NullableIntMinMaxAggregationOperator.cs
- CodeTypeDeclarationCollection.cs
- SqlDataSourceRefreshSchemaForm.cs
- EtwTrackingParticipant.cs
- SafeWaitHandle.cs
- PerformanceCounterScope.cs
- TraceProvider.cs
- BitmapEncoder.cs
- ParallelActivityDesigner.cs
- DataColumnMapping.cs
- CircleEase.cs
- GenericPrincipal.cs
- UnsafeNativeMethods.cs
- TextTreeFixupNode.cs
- DiagnosticsConfiguration.cs
- XmlTextReaderImplHelpers.cs
- PreloadedPackages.cs
- Matrix3D.cs
- DoubleAnimationClockResource.cs
- Rotation3D.cs
- wgx_sdk_version.cs
- ValueQuery.cs
- SoapFormatter.cs
- Util.cs
- OleDbInfoMessageEvent.cs
- WorkflowMarkupElementEventArgs.cs
- BigInt.cs
- SafeTokenHandle.cs
- CachedCompositeFamily.cs
- SessionStateModule.cs
- ConnectionStringsExpressionBuilder.cs
- ImageListStreamer.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- HttpPostedFileBase.cs
- HtmlTableRow.cs
- OutOfProcStateClientManager.cs
- IInstanceTable.cs
- OleDbPermission.cs
- GridViewDeletedEventArgs.cs
- PathData.cs
- BitmapScalingModeValidation.cs
- TimerElapsedEvenArgs.cs
- DataGridState.cs
- HasCopySemanticsAttribute.cs
- UnwrappedTypesXmlSerializerManager.cs
- InvokePattern.cs
- SqlWebEventProvider.cs
- ScriptHandlerFactory.cs
- CheckStoreFileValidityRequest.cs
- ScriptDescriptor.cs
- DataGridViewTopRowAccessibleObject.cs
- QualifierSet.cs
- AdapterDictionary.cs
- DefinitionBase.cs
- SqlGatherProducedAliases.cs
- SecurityDocument.cs
- GraphicsContext.cs
- Process.cs
- ZoneMembershipCondition.cs
- HotSpotCollection.cs
- DataGridTextBox.cs
- RowType.cs
- QilInvokeEarlyBound.cs
- MarkerProperties.cs
- EntityParameter.cs
- MembershipUser.cs
- StreamingContext.cs
- MessageBox.cs
- FilterEventArgs.cs
- DbSetClause.cs
- Grammar.cs
- TryCatch.cs
- ExpressionBuilderCollection.cs
- ShaperBuffers.cs
- TypeConverterHelper.cs
- TextBoxAutoCompleteSourceConverter.cs
- ResponseStream.cs
- RequestSecurityTokenForGetBrowserToken.cs
- RolePrincipal.cs
- Error.cs
- TableDesigner.cs
- SingleConverter.cs
- AutoScrollHelper.cs
- MetadataPropertyAttribute.cs
- SchemaMapping.cs
- GrammarBuilderBase.cs
- SessionEndingCancelEventArgs.cs
- PageEventArgs.cs