Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- MenuItemBindingCollection.cs
- ConfigurationHelpers.cs
- MailAddress.cs
- SmiEventSink_DeferedProcessing.cs
- ScaleTransform3D.cs
- HttpListenerException.cs
- DataGridViewCellPaintingEventArgs.cs
- altserialization.cs
- TdsParser.cs
- ProfileSection.cs
- ParserStack.cs
- Font.cs
- RangeValidator.cs
- PseudoWebRequest.cs
- PointCollectionConverter.cs
- ProxyAttribute.cs
- _OSSOCK.cs
- DbProviderConfigurationHandler.cs
- PointLightBase.cs
- MethodImplAttribute.cs
- RegexNode.cs
- SelectedCellsCollection.cs
- WpfSharedXamlSchemaContext.cs
- XmlMembersMapping.cs
- XmlNodeReader.cs
- Rectangle.cs
- BitmapEncoder.cs
- PropertyGridCommands.cs
- SafeProcessHandle.cs
- ImageMapEventArgs.cs
- XmlReflectionMember.cs
- localization.cs
- EntityContainer.cs
- SessionPageStatePersister.cs
- XomlCompilerError.cs
- TextElement.cs
- _FixedSizeReader.cs
- Parameter.cs
- FrugalMap.cs
- TrustLevel.cs
- XamlFxTrace.cs
- MemberPath.cs
- DesignerActionList.cs
- DataGridItemEventArgs.cs
- Misc.cs
- SystemIcons.cs
- ScrollEventArgs.cs
- TextReader.cs
- EntityDataSourceColumn.cs
- WebPartVerb.cs
- DbConnectionPoolOptions.cs
- GeneralTransform.cs
- SqlDataSource.cs
- SynchronousChannelMergeEnumerator.cs
- IndentTextWriter.cs
- storepermissionattribute.cs
- RepeaterItemEventArgs.cs
- ListItemsPage.cs
- EnumerableRowCollection.cs
- ExpressionVisitor.cs
- SolidColorBrush.cs
- HtmlSelectionListAdapter.cs
- PointCollectionConverter.cs
- Timer.cs
- VolatileResourceManager.cs
- DetailsView.cs
- EncoderParameter.cs
- HeaderedContentControl.cs
- TableDesigner.cs
- CommentAction.cs
- DateTimeFormatInfoScanner.cs
- UdpTransportSettings.cs
- HtmlDocument.cs
- DataGridViewLinkColumn.cs
- RecognizedAudio.cs
- CellParagraph.cs
- DesignerDataParameter.cs
- TextServicesDisplayAttributePropertyRanges.cs
- HttpUnhandledOperationInvoker.cs
- HiddenField.cs
- Point4DConverter.cs
- Inflater.cs
- _SingleItemRequestCache.cs
- SafeBuffer.cs
- StreamResourceInfo.cs
- EntityTypeBase.cs
- UserPreferenceChangingEventArgs.cs
- SettingsProperty.cs
- AnnotationStore.cs
- dbenumerator.cs
- PageVisual.cs
- CqlLexerHelpers.cs
- AppSettingsReader.cs
- Base64Decoder.cs
- WindowsListViewItemCheckBox.cs
- WindowsListViewGroup.cs
- Int32Converter.cs
- QilExpression.cs
- DefaultPrintController.cs
- Matrix3DConverter.cs