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
- EventDescriptor.cs
- FusionWrap.cs
- UserControlAutomationPeer.cs
- Visitor.cs
- Padding.cs
- DataGridViewRowHeaderCell.cs
- VariantWrapper.cs
- PackagePartCollection.cs
- ColumnMapProcessor.cs
- WindowVisualStateTracker.cs
- CallContext.cs
- RubberbandSelector.cs
- PassportAuthentication.cs
- UpDownBase.cs
- TransformerInfoCollection.cs
- FontCacheLogic.cs
- NavigationWindowAutomationPeer.cs
- Parameter.cs
- AppearanceEditorPart.cs
- InplaceBitmapMetadataWriter.cs
- InputLanguageCollection.cs
- PrinterResolution.cs
- GenericEnumConverter.cs
- GeneralTransformGroup.cs
- SystemColors.cs
- SoapCodeExporter.cs
- BuildManager.cs
- ExeContext.cs
- TranslateTransform3D.cs
- GeneralTransform.cs
- ServiceHttpModule.cs
- Pair.cs
- LockedAssemblyCache.cs
- ActivityExecutionContext.cs
- NamespaceEmitter.cs
- XamlFrame.cs
- IsolatedStorageFileStream.cs
- BrushMappingModeValidation.cs
- Regex.cs
- DataGridViewColumnConverter.cs
- DataList.cs
- InvalidProgramException.cs
- GeneralTransform2DTo3D.cs
- ConfigurationException.cs
- SamlAttributeStatement.cs
- InkCollectionBehavior.cs
- ProfileSettings.cs
- PageHandlerFactory.cs
- WindowsTreeView.cs
- DataSetMappper.cs
- MailWriter.cs
- ResolveDuplexAsyncResult.cs
- UTF8Encoding.cs
- SQLDecimal.cs
- Size3DConverter.cs
- AlignmentXValidation.cs
- DocumentXPathNavigator.cs
- EnumerableRowCollection.cs
- QueueProcessor.cs
- DataControlButton.cs
- Char.cs
- CornerRadiusConverter.cs
- FontStyle.cs
- XmlUtf8RawTextWriter.cs
- DragDeltaEventArgs.cs
- GridToolTip.cs
- WhiteSpaceTrimStringConverter.cs
- NamespaceInfo.cs
- PropertyChangedEventManager.cs
- StreamGeometryContext.cs
- XmlTextReaderImpl.cs
- CellNormalizer.cs
- FontInfo.cs
- MediaSystem.cs
- WebPartEditorOkVerb.cs
- LostFocusEventManager.cs
- AnnouncementService.cs
- ZipIOExtraField.cs
- WinEventTracker.cs
- EntityWithKeyStrategy.cs
- MenuItemBinding.cs
- SimplePropertyEntry.cs
- SingleObjectCollection.cs
- CriticalExceptions.cs
- SoapObjectInfo.cs
- CheckBoxStandardAdapter.cs
- LifetimeServices.cs
- XsltException.cs
- FormatException.cs
- SchemaImporterExtensionElementCollection.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- TargetInvocationException.cs
- SafeBitVector32.cs
- HScrollProperties.cs
- FontNameEditor.cs
- SmtpNegotiateAuthenticationModule.cs
- PrintingPermission.cs
- AbstractSvcMapFileLoader.cs
- WebPermission.cs
- IconHelper.cs