Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Net / System / Net / Configuration / FtpCachePolicyElement.cs / 1 / FtpCachePolicyElement.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Configuration { using System; using System.Configuration; using System.Net.Cache; using System.Xml; using System.Security.Permissions; public sealed class FtpCachePolicyElement : ConfigurationElement { public FtpCachePolicyElement() { this.properties.Add(this.policyLevel); } protected override ConfigurationPropertyCollection Properties { get { return this.properties; } } [ConfigurationProperty(ConfigurationStrings.PolicyLevel, DefaultValue = RequestCacheLevel.Default)] public RequestCacheLevel PolicyLevel { get { return (RequestCacheLevel)this[this.policyLevel]; } set { this[this.policyLevel] = value; } } protected override void DeserializeElement(XmlReader reader, bool serializeCollectionKey) { wasReadFromConfig = true; base.DeserializeElement(reader, serializeCollectionKey); } protected override void Reset(ConfigurationElement parentElement) { if (parentElement != null) { FtpCachePolicyElement http = (FtpCachePolicyElement)parentElement; this.wasReadFromConfig = http.wasReadFromConfig; } base.Reset(parentElement); } internal bool WasReadFromConfig { get { return this.wasReadFromConfig; } } bool wasReadFromConfig = false; ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); readonly ConfigurationProperty policyLevel = new ConfigurationProperty(ConfigurationStrings.PolicyLevel, typeof(RequestCacheLevel), RequestCacheLevel.Default, 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.Net.Cache; using System.Xml; using System.Security.Permissions; public sealed class FtpCachePolicyElement : ConfigurationElement { public FtpCachePolicyElement() { this.properties.Add(this.policyLevel); } protected override ConfigurationPropertyCollection Properties { get { return this.properties; } } [ConfigurationProperty(ConfigurationStrings.PolicyLevel, DefaultValue = RequestCacheLevel.Default)] public RequestCacheLevel PolicyLevel { get { return (RequestCacheLevel)this[this.policyLevel]; } set { this[this.policyLevel] = value; } } protected override void DeserializeElement(XmlReader reader, bool serializeCollectionKey) { wasReadFromConfig = true; base.DeserializeElement(reader, serializeCollectionKey); } protected override void Reset(ConfigurationElement parentElement) { if (parentElement != null) { FtpCachePolicyElement http = (FtpCachePolicyElement)parentElement; this.wasReadFromConfig = http.wasReadFromConfig; } base.Reset(parentElement); } internal bool WasReadFromConfig { get { return this.wasReadFromConfig; } } bool wasReadFromConfig = false; ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); readonly ConfigurationProperty policyLevel = new ConfigurationProperty(ConfigurationStrings.PolicyLevel, typeof(RequestCacheLevel), RequestCacheLevel.Default, 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
- TextElementEnumerator.cs
- Misc.cs
- TypeSystem.cs
- XslCompiledTransform.cs
- DataContractSerializer.cs
- Utils.cs
- EntityDesignerUtils.cs
- HttpDictionary.cs
- DataGridColumnCollection.cs
- LongPath.cs
- COM2Properties.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- ConfigurationLockCollection.cs
- RestHandlerFactory.cs
- QueryCreatedEventArgs.cs
- HierarchicalDataBoundControl.cs
- DataError.cs
- DoubleLink.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- IteratorFilter.cs
- NameObjectCollectionBase.cs
- ViewStateException.cs
- ConstructorBuilder.cs
- UnaryNode.cs
- SoundPlayer.cs
- IListConverters.cs
- ResourceExpression.cs
- Collection.cs
- WebPartAuthorizationEventArgs.cs
- DispatcherProcessingDisabled.cs
- DataBinding.cs
- TemplateManager.cs
- XomlCompiler.cs
- Light.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- HybridWebProxyFinder.cs
- SemaphoreFullException.cs
- XhtmlConformanceSection.cs
- PointLightBase.cs
- ServiceProviders.cs
- EntityModelSchemaGenerator.cs
- SafeUserTokenHandle.cs
- SEHException.cs
- ConnectionsZoneDesigner.cs
- DataRowView.cs
- MissingSatelliteAssemblyException.cs
- SimpleWorkerRequest.cs
- LoadedOrUnloadedOperation.cs
- TypePropertyEditor.cs
- TreeNodeSelectionProcessor.cs
- WindowsTitleBar.cs
- Normalizer.cs
- AstTree.cs
- TypeConverterAttribute.cs
- DataBindingExpressionBuilder.cs
- StaticSiteMapProvider.cs
- CodeGenerator.cs
- BitmapEffectGeneralTransform.cs
- DataGridTextBox.cs
- HandledEventArgs.cs
- GeometryCombineModeValidation.cs
- ProfileSettings.cs
- EventLogPermission.cs
- FindSimilarActivitiesVerb.cs
- MultiBindingExpression.cs
- LinearGradientBrush.cs
- FilterElement.cs
- CompilerState.cs
- TypeElementCollection.cs
- NativeConfigurationLoader.cs
- CodeStatement.cs
- WebPartsPersonalization.cs
- WebPartDescriptionCollection.cs
- EllipseGeometry.cs
- CustomCategoryAttribute.cs
- DetailsViewUpdatedEventArgs.cs
- Array.cs
- XmlSchemaSimpleType.cs
- PointConverter.cs
- ObjectDataSource.cs
- ServiceElement.cs
- HealthMonitoringSectionHelper.cs
- ChannelEndpointElementCollection.cs
- ControlValuePropertyAttribute.cs
- DataSourceXmlSubItemAttribute.cs
- SQLMoney.cs
- Int64AnimationBase.cs
- LoadMessageLogger.cs
- WorkflowRuntimeServiceElementCollection.cs
- SerializationInfoEnumerator.cs
- KeyInterop.cs
- SerialStream.cs
- XsltArgumentList.cs
- UrlPropertyAttribute.cs
- CellRelation.cs
- ScrollChrome.cs
- precedingquery.cs
- XmlEntity.cs
- TableAdapterManagerNameHandler.cs
- DeadCharTextComposition.cs