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
- Exceptions.cs
- DataRowView.cs
- Timer.cs
- TextHidden.cs
- BufferedReceiveManager.cs
- ListView.cs
- CompilerTypeWithParams.cs
- LinearGradientBrush.cs
- BaseDataListPage.cs
- Graph.cs
- SystemGatewayIPAddressInformation.cs
- PeerHelpers.cs
- RadioButton.cs
- TraceXPathNavigator.cs
- HttpServerVarsCollection.cs
- Error.cs
- QilXmlReader.cs
- DocumentViewerHelper.cs
- WmlValidationSummaryAdapter.cs
- ToolStripPanelSelectionBehavior.cs
- CellParaClient.cs
- ActivityMetadata.cs
- HebrewNumber.cs
- TextTreeFixupNode.cs
- ExpanderAutomationPeer.cs
- SystemIPAddressInformation.cs
- FormatterServicesNoSerializableCheck.cs
- TrailingSpaceComparer.cs
- DocumentViewerHelper.cs
- XmlSchemaSimpleContent.cs
- CompilerCollection.cs
- XmlSchemaChoice.cs
- XmlDeclaration.cs
- SafeUserTokenHandle.cs
- NumberFunctions.cs
- ProviderConnectionPoint.cs
- WebPartMinimizeVerb.cs
- XamlWrappingReader.cs
- PresentationSource.cs
- MarkupExtensionReturnTypeAttribute.cs
- CacheRequest.cs
- EntityParameterCollection.cs
- ErrorRuntimeConfig.cs
- CompilationLock.cs
- AxHost.cs
- UserPersonalizationStateInfo.cs
- JpegBitmapEncoder.cs
- FunctionParameter.cs
- DocumentGridContextMenu.cs
- SatelliteContractVersionAttribute.cs
- ScrollChrome.cs
- SystemSounds.cs
- XdrBuilder.cs
- Highlights.cs
- PenContext.cs
- WebAdminConfigurationHelper.cs
- MetabaseServerConfig.cs
- WebPartConnectVerb.cs
- EventLogQuery.cs
- DocumentAutomationPeer.cs
- Event.cs
- TouchPoint.cs
- DNS.cs
- MimeTypeMapper.cs
- SQLDateTimeStorage.cs
- GlobalItem.cs
- ContextStack.cs
- MessageProtectionOrder.cs
- ListControlDataBindingHandler.cs
- ComplexPropertyEntry.cs
- ClassHandlersStore.cs
- SHA512.cs
- DataGridViewTextBoxEditingControl.cs
- ClientSponsor.cs
- ActivityExecutionContext.cs
- MessageBox.cs
- ChannelServices.cs
- SelectionItemPattern.cs
- WindowsIdentity.cs
- ExpandoClass.cs
- FileStream.cs
- QilStrConcatenator.cs
- NumberFormatter.cs
- EventLogPermissionEntry.cs
- ClockGroup.cs
- IntSecurity.cs
- oledbmetadatacolumnnames.cs
- ObjectSecurity.cs
- ViewDesigner.cs
- DoubleLinkList.cs
- BufferedMessageWriter.cs
- PropertyValue.cs
- assemblycache.cs
- ImpersonateTokenRef.cs
- Int32.cs
- VisualBasicValue.cs
- dsa.cs
- PropertyChange.cs
- DivideByZeroException.cs
- PartialCachingControl.cs