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
- UTF7Encoding.cs
- BatchParser.cs
- EncryptedXml.cs
- OleAutBinder.cs
- StorageRoot.cs
- ScrollItemPatternIdentifiers.cs
- HierarchicalDataSourceDesigner.cs
- InputMethodStateChangeEventArgs.cs
- ReferencedCollectionType.cs
- XamlSerializationHelper.cs
- TreeWalkHelper.cs
- DeflateStream.cs
- SqlDependencyListener.cs
- ChannelEndpointElement.cs
- CheckBoxField.cs
- ColumnMapCopier.cs
- NameTable.cs
- XPathDocumentNavigator.cs
- OleDbMetaDataFactory.cs
- AxisAngleRotation3D.cs
- PolicyImporterElementCollection.cs
- NotifyParentPropertyAttribute.cs
- ExpressionBindings.cs
- SqlClientWrapperSmiStreamChars.cs
- StringFunctions.cs
- WriterOutput.cs
- MimeObjectFactory.cs
- EntryPointNotFoundException.cs
- ProcessHostMapPath.cs
- RegistrationServices.cs
- StubHelpers.cs
- ProgressBarRenderer.cs
- ExeContext.cs
- OperationInfoBase.cs
- ConfigXmlSignificantWhitespace.cs
- TextEditorSelection.cs
- SystemWebCachingSectionGroup.cs
- XPathScanner.cs
- Tablet.cs
- MaskedTextBoxTextEditor.cs
- DataExpression.cs
- PluggableProtocol.cs
- EncryptedPackageFilter.cs
- InlineObject.cs
- VisualStyleTypesAndProperties.cs
- SelectionEditingBehavior.cs
- VirtualDirectoryMappingCollection.cs
- MetadataItemEmitter.cs
- PropertyGeneratedEventArgs.cs
- ListControl.cs
- SourceFileBuildProvider.cs
- OdbcConnectionOpen.cs
- SecurityValidationBehavior.cs
- Matrix3DValueSerializer.cs
- FrameworkRichTextComposition.cs
- KeySplineConverter.cs
- StreamGeometry.cs
- WmlListAdapter.cs
- EntityDataSourceChangingEventArgs.cs
- BamlRecords.cs
- ChannelPoolSettingsElement.cs
- RijndaelManagedTransform.cs
- AddValidationError.cs
- ApplicationBuildProvider.cs
- PageThemeParser.cs
- RC2CryptoServiceProvider.cs
- Margins.cs
- ReceiveActivity.cs
- ThreadPoolTaskScheduler.cs
- EmbeddedMailObjectCollectionEditor.cs
- AnnotationComponentManager.cs
- MediaSystem.cs
- XsdCachingReader.cs
- HeaderLabel.cs
- StrokeIntersection.cs
- XsdBuildProvider.cs
- GreenMethods.cs
- PointKeyFrameCollection.cs
- XsdDateTime.cs
- PersistenceMetadataNamespace.cs
- SqlDataSourceSelectingEventArgs.cs
- ScalarConstant.cs
- DefaultCommandConverter.cs
- HandoffBehavior.cs
- CleanUpVirtualizedItemEventArgs.cs
- Calendar.cs
- SqlStatistics.cs
- BitmapEffectInputData.cs
- BypassElementCollection.cs
- DesignerActionList.cs
- DescendentsWalkerBase.cs
- CardSpaceException.cs
- MsmqIntegrationProcessProtocolHandler.cs
- NonVisualControlAttribute.cs
- NotifyParentPropertyAttribute.cs
- XsdDuration.cs
- SqlPersonalizationProvider.cs
- Light.cs
- ReaderWriterLockSlim.cs
- StaticSiteMapProvider.cs