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
- ResponseStream.cs
- RuntimeHandles.cs
- ChannelSinkStacks.cs
- DiscoveryClientDocuments.cs
- CheckBoxField.cs
- WorkflowViewService.cs
- InstanceHandle.cs
- AmbientLight.cs
- PerfCounterSection.cs
- WmlMobileTextWriter.cs
- FormsAuthentication.cs
- RelationshipManager.cs
- Pkcs7Recipient.cs
- ChtmlFormAdapter.cs
- ServiceModelEnumValidator.cs
- MulticastOption.cs
- BindingExpressionBase.cs
- DataListItem.cs
- CodeSnippetStatement.cs
- TailCallAnalyzer.cs
- SpecularMaterial.cs
- FusionWrap.cs
- GeneralTransformCollection.cs
- ResourceContainer.cs
- InputManager.cs
- WindowsFont.cs
- WebColorConverter.cs
- MSG.cs
- TransactedReceiveData.cs
- CryptoConfig.cs
- CorrelationToken.cs
- ModelService.cs
- XmlWhitespace.cs
- SqlParameterCollection.cs
- TypeUnloadedException.cs
- BamlRecords.cs
- HttpProtocolReflector.cs
- XmlCharacterData.cs
- NeedSkipTokenVisitor.cs
- PageThemeBuildProvider.cs
- XmlSchema.cs
- DbBuffer.cs
- GetPageNumberCompletedEventArgs.cs
- ExpressionBuilder.cs
- RichTextBoxAutomationPeer.cs
- AppearanceEditorPart.cs
- AddInSegmentDirectoryNotFoundException.cs
- NullableConverter.cs
- OperatorExpressions.cs
- ErrorFormatter.cs
- ItemsChangedEventArgs.cs
- NewExpression.cs
- AudioException.cs
- AddInServer.cs
- XmlHierarchyData.cs
- TdsEnums.cs
- TaskFileService.cs
- DiscoveryExceptionDictionary.cs
- BackgroundWorker.cs
- DesignTimeTemplateParser.cs
- ReflectionPermission.cs
- SqlNodeAnnotation.cs
- SystemSounds.cs
- CounterSet.cs
- SuppressMessageAttribute.cs
- _Win32.cs
- DesignerForm.cs
- ExpressionBuilderContext.cs
- TraceLevelStore.cs
- SqlHelper.cs
- PasswordRecovery.cs
- ArraySet.cs
- SecureUICommand.cs
- oledbconnectionstring.cs
- NavigationEventArgs.cs
- DetailsViewRowCollection.cs
- EpmCustomContentDeSerializer.cs
- DiagnosticStrings.cs
- UserControl.cs
- InstallerTypeAttribute.cs
- DiagnosticTraceSource.cs
- ThreadAttributes.cs
- OpacityConverter.cs
- UInt64.cs
- OperationParameterInfoCollection.cs
- PropertyValueChangedEvent.cs
- UnsafeNetInfoNativeMethods.cs
- EncoderReplacementFallback.cs
- WebBrowsableAttribute.cs
- ActivityExecutionFilter.cs
- Rotation3D.cs
- DoubleLinkList.cs
- IndexerReference.cs
- CodeTypeMemberCollection.cs
- PingReply.cs
- WebProxyScriptElement.cs
- ConfigXmlText.cs
- SystemFonts.cs
- ExecutionPropertyManager.cs
- CornerRadius.cs