Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Configuration / FtpCachePolicyElement.cs / 1305376 / 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
- Socket.cs
- LicenseException.cs
- ServiceHost.cs
- XmlJsonReader.cs
- MembershipSection.cs
- FlagsAttribute.cs
- RoutedEventHandlerInfo.cs
- FaultException.cs
- SqlDataSourceStatusEventArgs.cs
- StateBag.cs
- ObjectDataSourceFilteringEventArgs.cs
- CaseExpr.cs
- complextypematerializer.cs
- RawKeyboardInputReport.cs
- PerspectiveCamera.cs
- Triplet.cs
- DistinctQueryOperator.cs
- EnvelopedPkcs7.cs
- DebugInfo.cs
- CodeGenerator.cs
- ToolStripDropDownButton.cs
- SchemaComplexType.cs
- FormsAuthenticationModule.cs
- AmbientEnvironment.cs
- _NegoState.cs
- StringArrayConverter.cs
- ErrorInfoXmlDocument.cs
- ResourceReferenceKeyNotFoundException.cs
- InstanceCreationEditor.cs
- ListViewGroup.cs
- CollectionViewGroup.cs
- Permission.cs
- ResourcesBuildProvider.cs
- ApplyTemplatesAction.cs
- AccessDataSourceView.cs
- XPathNavigator.cs
- GeneralTransform3DCollection.cs
- DynamicMethod.cs
- FlowNode.cs
- AQNBuilder.cs
- LateBoundBitmapDecoder.cs
- ServiceModelConfigurationSectionCollection.cs
- EmbeddedMailObjectCollectionEditor.cs
- ConfigurationPropertyCollection.cs
- SkipStoryboardToFill.cs
- IgnoreFileBuildProvider.cs
- DrawingVisual.cs
- SelectorAutomationPeer.cs
- ServiceHttpModule.cs
- WebPartManager.cs
- AssociationSet.cs
- BoundingRectTracker.cs
- PingReply.cs
- ProfilePropertySettingsCollection.cs
- ConfigurationSection.cs
- ProxyWebPartConnectionCollection.cs
- UnsafeNativeMethods.cs
- XmlSchemaAnyAttribute.cs
- TdsParserStateObject.cs
- ToolStripDropDown.cs
- SystemParameters.cs
- PrimitiveCodeDomSerializer.cs
- NamespaceMapping.cs
- OleDbSchemaGuid.cs
- ProcessModuleCollection.cs
- ChannelPoolSettings.cs
- ClientTargetSection.cs
- CommandDevice.cs
- UnmanagedBitmapWrapper.cs
- UnsignedPublishLicense.cs
- ObjectContextServiceProvider.cs
- KeyedCollection.cs
- MostlySingletonList.cs
- HttpApplication.cs
- XmlAnyElementAttributes.cs
- PkcsUtils.cs
- _Events.cs
- VisualStates.cs
- SoundPlayerAction.cs
- DesignerDataConnection.cs
- DataGridViewToolTip.cs
- SmtpReplyReaderFactory.cs
- linebase.cs
- Trace.cs
- XmlDataSource.cs
- DataSourceCacheDurationConverter.cs
- DbgUtil.cs
- UserPersonalizationStateInfo.cs
- SizeAnimation.cs
- ValidatorCollection.cs
- ListCardsInFileRequest.cs
- RecognizerBase.cs
- ToolStripOverflow.cs
- Tracking.cs
- FilteredXmlReader.cs
- RtfFormatStack.cs
- DBConcurrencyException.cs
- IgnorePropertiesAttribute.cs
- ExpressionConverter.cs
- OptimalBreakSession.cs