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
- DesignerOptions.cs
- UnsupportedPolicyOptionsException.cs
- CookieHandler.cs
- GraphicsPathIterator.cs
- TimeSpanFormat.cs
- Geometry.cs
- ExternalCalls.cs
- AdRotator.cs
- CodeBlockBuilder.cs
- Int16Converter.cs
- Event.cs
- WaitForChangedResult.cs
- EventWaitHandle.cs
- CheckBoxFlatAdapter.cs
- LogLogRecordHeader.cs
- AttributeProviderAttribute.cs
- NodeLabelEditEvent.cs
- CompositeDesignerAccessibleObject.cs
- StyleReferenceConverter.cs
- ProxyGenerationError.cs
- Mutex.cs
- WorkflowPersistenceContext.cs
- DecoratedNameAttribute.cs
- HuffmanTree.cs
- LocalBuilder.cs
- DynamicActionMessageFilter.cs
- MimeWriter.cs
- InkCanvasFeedbackAdorner.cs
- DataGridViewMethods.cs
- BindingList.cs
- XmlTextReader.cs
- FormatterServices.cs
- ApplicationId.cs
- XmlSchemaObjectTable.cs
- OdbcConnectionOpen.cs
- WorkflowEnvironment.cs
- PieceDirectory.cs
- CapabilitiesUse.cs
- ContentHostHelper.cs
- NavigationProperty.cs
- WrapPanel.cs
- DecimalStorage.cs
- ButtonFlatAdapter.cs
- TypeKeyValue.cs
- MinMaxParagraphWidth.cs
- UmAlQuraCalendar.cs
- Process.cs
- URLBuilder.cs
- SqlInternalConnectionSmi.cs
- GenericXmlSecurityToken.cs
- NullableBoolConverter.cs
- TextStore.cs
- WindowsListViewGroupHelper.cs
- BeginEvent.cs
- HandlerWithFactory.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- CompositionTarget.cs
- SimplePropertyEntry.cs
- DictionaryBase.cs
- WebPartConnectionsCancelEventArgs.cs
- DefaultBinder.cs
- ProjectionCamera.cs
- HeaderFilter.cs
- LabelInfo.cs
- RelatedImageListAttribute.cs
- Semaphore.cs
- ConcurrentQueue.cs
- SmtpException.cs
- DataComponentGenerator.cs
- TextServicesContext.cs
- ScrollChrome.cs
- WeakEventTable.cs
- IDQuery.cs
- ProfileProvider.cs
- DatagridviewDisplayedBandsData.cs
- PointKeyFrameCollection.cs
- PointCollection.cs
- Rotation3DAnimationBase.cs
- DocumentGridPage.cs
- XmlProcessingInstruction.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- WizardForm.cs
- StoreAnnotationsMap.cs
- AutomationElementCollection.cs
- BrowserTree.cs
- ToolStripSplitStackLayout.cs
- PointLight.cs
- InvalidOleVariantTypeException.cs
- ColorConvertedBitmap.cs
- VoiceObjectToken.cs
- VersionedStream.cs
- MouseButtonEventArgs.cs
- ValuePatternIdentifiers.cs
- SemanticAnalyzer.cs
- DeflateEmulationStream.cs
- SurrogateChar.cs
- WebPartRestoreVerb.cs
- JsonClassDataContract.cs
- Site.cs
- HwndProxyElementProvider.cs