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
- Point.cs
- ToolBarButton.cs
- FrameworkPropertyMetadata.cs
- InvalidOperationException.cs
- PolyBezierSegmentFigureLogic.cs
- BuildResult.cs
- DefaultSection.cs
- ListMarkerSourceInfo.cs
- RepeatBehavior.cs
- TextEditorThreadLocalStore.cs
- DoubleAnimationUsingPath.cs
- AudioFileOut.cs
- NetNamedPipeBindingElement.cs
- SafeRegistryHandle.cs
- RelationshipDetailsCollection.cs
- InvalidComObjectException.cs
- PageThemeBuildProvider.cs
- TypeUnloadedException.cs
- baseaxisquery.cs
- Compiler.cs
- StackOverflowException.cs
- LassoHelper.cs
- DefaultValueConverter.cs
- CacheMemory.cs
- ParameterElement.cs
- SingleTagSectionHandler.cs
- COM2ExtendedTypeConverter.cs
- CompositionAdorner.cs
- DataGridViewCellPaintingEventArgs.cs
- ResourcePool.cs
- EventWaitHandleSecurity.cs
- XmlConvert.cs
- Point3DKeyFrameCollection.cs
- SmiRecordBuffer.cs
- _DomainName.cs
- ConfigurationManagerHelperFactory.cs
- DataGridViewCheckBoxCell.cs
- SmiEventSink_DeferedProcessing.cs
- ZeroOpNode.cs
- UdpContractFilterBehavior.cs
- ReverseComparer.cs
- SqlLiftWhereClauses.cs
- EntityConnectionStringBuilderItem.cs
- ExpandedWrapper.cs
- ObjectResult.cs
- RuntimeConfigurationRecord.cs
- CorrelationToken.cs
- SID.cs
- Documentation.cs
- Style.cs
- InvalidProgramException.cs
- SuspendDesigner.cs
- UnsafeNativeMethodsCLR.cs
- FlowLayoutPanelDesigner.cs
- CustomErrorCollection.cs
- ExpandableObjectConverter.cs
- TextServicesDisplayAttributePropertyRanges.cs
- TextViewElement.cs
- TableItemStyle.cs
- DescendantBaseQuery.cs
- Classification.cs
- ExeConfigurationFileMap.cs
- AsymmetricSignatureDeformatter.cs
- ColorTransform.cs
- SpeechUI.cs
- WpfPayload.cs
- EntityWithKeyStrategy.cs
- LockCookie.cs
- SQLByte.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- PromptStyle.cs
- VisualCollection.cs
- TextRangeEdit.cs
- ClientSponsor.cs
- TransformProviderWrapper.cs
- IODescriptionAttribute.cs
- Animatable.cs
- ComNativeDescriptor.cs
- NameScope.cs
- ExpressionList.cs
- TypeInfo.cs
- SupportingTokenBindingElement.cs
- CreateUserWizardStep.cs
- PageThemeCodeDomTreeGenerator.cs
- TimeoutException.cs
- WindowsListViewGroup.cs
- XmlSerializableReader.cs
- ErrorTableItemStyle.cs
- PropertyKey.cs
- JulianCalendar.cs
- DbMetaDataColumnNames.cs
- Baml2006Reader.cs
- Pair.cs
- QuadraticBezierSegment.cs
- TraceContext.cs
- RightsManagementUser.cs
- SqlDataSourceView.cs
- PointAnimationUsingPath.cs
- FramingChannels.cs
- SizeAnimationClockResource.cs