Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / Configuration / CacheSection.cs / 1 / CacheSection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Configuration {
using System;
using System.Xml;
using System.Configuration;
using System.Collections.Specialized;
using System.Collections;
using System.IO;
using System.Text;
using System.Web.Caching;
using System.ComponentModel;
using System.Security.Permissions;
/*
*/
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class CacheSection : ConfigurationSection {
internal static TimeSpan DefaultPrivateBytesPollTime = new TimeSpan(0, 2, 0);
private static ConfigurationPropertyCollection _properties;
#if NOT_UNTIL_LATER
private static readonly ConfigurationProperty _propCacheAPIEnabled;
private static readonly ConfigurationProperty _propDisableDependencies;
#endif
private static readonly ConfigurationProperty _propDisableMemoryCollection;
private static readonly ConfigurationProperty _propDisableExpiration;
private static readonly ConfigurationProperty _propPrivateBytesLimit;
private static readonly ConfigurationProperty _propPercentagePhysicalMemoryUsedLimit;
private static readonly ConfigurationProperty _propPrivateBytesPollTime;
static CacheSection() {
// Property initialization
#if NOT_UNTIL_LATER
_propCacheAPIEnabled = new ConfigurationProperty("cacheAPIEnabled", typeof(bool), true, ConfigurationPropertyOptions.None);
_propDisableDependencies = new ConfigurationProperty("disableDependencies", typeof(bool), false, ConfigurationPropertyOptions.None);
#endif
_propDisableMemoryCollection =
new ConfigurationProperty("disableMemoryCollection",
typeof(bool),
false,
ConfigurationPropertyOptions.None);
_propDisableExpiration =
new ConfigurationProperty("disableExpiration",
typeof(bool),
false,
ConfigurationPropertyOptions.None);
_propPrivateBytesLimit =
new ConfigurationProperty("privateBytesLimit",
typeof(long),
(long)0,
null,
new LongValidator(0, long.MaxValue),
ConfigurationPropertyOptions.None);
_propPercentagePhysicalMemoryUsedLimit =
new ConfigurationProperty("percentagePhysicalMemoryUsedLimit",
typeof(int),
(int)0,
null,
new IntegerValidator(0, 100),
ConfigurationPropertyOptions.None);
_propPrivateBytesPollTime =
new ConfigurationProperty("privateBytesPollTime",
typeof(TimeSpan),
DefaultPrivateBytesPollTime,
StdValidatorsAndConverters.InfiniteTimeSpanConverter,
StdValidatorsAndConverters.PositiveTimeSpanValidator,
ConfigurationPropertyOptions.None);
_properties = new ConfigurationPropertyCollection();
#if NOT_UNTIL_LATER
_properties.Add(_propCacheAPIEnabled);
_properties.Add(_propDisableDependencies);
#endif
_properties.Add(_propDisableMemoryCollection);
_properties.Add(_propDisableExpiration);
_properties.Add(_propPrivateBytesLimit);
_properties.Add(_propPercentagePhysicalMemoryUsedLimit);
_properties.Add(_propPrivateBytesPollTime);
}
public CacheSection() {
}
#if NOT_UNTIL_LATER
[ConfigurationProperty("cacheAPIEnabled", DefaultValue = true)]
public bool CacheAPIEnabled
{
get
{
return (bool)base[_propCacheAPIEnabled];
}
set
{
base[_propCacheAPIEnabled] = value;
}
}
#endif
[ConfigurationProperty("disableMemoryCollection", DefaultValue = false)]
public bool DisableMemoryCollection {
get {
return (bool)base[_propDisableMemoryCollection];
}
set {
base[_propDisableMemoryCollection] = value;
}
}
[ConfigurationProperty("disableExpiration", DefaultValue = false)]
public bool DisableExpiration {
get {
return (bool)base[_propDisableExpiration];
}
set {
base[_propDisableExpiration] = value;
}
}
#if NOT_UNTIL_LATER
[ConfigurationProperty("disableDependencies", DefaultValue = false)]
public bool DisableDependencies
{
get
{
return (bool)base[_propDisableDependencies];
}
set
{
base[_propDisableDependencies] = value;
}
}
#endif
[ConfigurationProperty("privateBytesLimit", DefaultValue = (long)0)]
[LongValidator(MinValue = 0)]
public long PrivateBytesLimit {
get {
return (long)base[_propPrivateBytesLimit];
}
set {
base[_propPrivateBytesLimit] = value;
}
}
[ConfigurationProperty("percentagePhysicalMemoryUsedLimit", DefaultValue = (int)0)]
[IntegerValidator(MinValue = 0, MaxValue = 100)]
public int PercentagePhysicalMemoryUsedLimit {
get {
return (int)base[_propPercentagePhysicalMemoryUsedLimit];
}
set {
base[_propPercentagePhysicalMemoryUsedLimit] = value;
}
}
protected override ConfigurationPropertyCollection Properties {
get {
return _properties;
}
}
[ConfigurationProperty("privateBytesPollTime", DefaultValue = "00:02:00")]
[TypeConverter(typeof(InfiniteTimeSpanConverter))]
public TimeSpan PrivateBytesPollTime {
get {
return (TimeSpan)base[_propPrivateBytesPollTime];
}
set {
base[_propPrivateBytesPollTime] = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Configuration {
using System;
using System.Xml;
using System.Configuration;
using System.Collections.Specialized;
using System.Collections;
using System.IO;
using System.Text;
using System.Web.Caching;
using System.ComponentModel;
using System.Security.Permissions;
/*
*/
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class CacheSection : ConfigurationSection {
internal static TimeSpan DefaultPrivateBytesPollTime = new TimeSpan(0, 2, 0);
private static ConfigurationPropertyCollection _properties;
#if NOT_UNTIL_LATER
private static readonly ConfigurationProperty _propCacheAPIEnabled;
private static readonly ConfigurationProperty _propDisableDependencies;
#endif
private static readonly ConfigurationProperty _propDisableMemoryCollection;
private static readonly ConfigurationProperty _propDisableExpiration;
private static readonly ConfigurationProperty _propPrivateBytesLimit;
private static readonly ConfigurationProperty _propPercentagePhysicalMemoryUsedLimit;
private static readonly ConfigurationProperty _propPrivateBytesPollTime;
static CacheSection() {
// Property initialization
#if NOT_UNTIL_LATER
_propCacheAPIEnabled = new ConfigurationProperty("cacheAPIEnabled", typeof(bool), true, ConfigurationPropertyOptions.None);
_propDisableDependencies = new ConfigurationProperty("disableDependencies", typeof(bool), false, ConfigurationPropertyOptions.None);
#endif
_propDisableMemoryCollection =
new ConfigurationProperty("disableMemoryCollection",
typeof(bool),
false,
ConfigurationPropertyOptions.None);
_propDisableExpiration =
new ConfigurationProperty("disableExpiration",
typeof(bool),
false,
ConfigurationPropertyOptions.None);
_propPrivateBytesLimit =
new ConfigurationProperty("privateBytesLimit",
typeof(long),
(long)0,
null,
new LongValidator(0, long.MaxValue),
ConfigurationPropertyOptions.None);
_propPercentagePhysicalMemoryUsedLimit =
new ConfigurationProperty("percentagePhysicalMemoryUsedLimit",
typeof(int),
(int)0,
null,
new IntegerValidator(0, 100),
ConfigurationPropertyOptions.None);
_propPrivateBytesPollTime =
new ConfigurationProperty("privateBytesPollTime",
typeof(TimeSpan),
DefaultPrivateBytesPollTime,
StdValidatorsAndConverters.InfiniteTimeSpanConverter,
StdValidatorsAndConverters.PositiveTimeSpanValidator,
ConfigurationPropertyOptions.None);
_properties = new ConfigurationPropertyCollection();
#if NOT_UNTIL_LATER
_properties.Add(_propCacheAPIEnabled);
_properties.Add(_propDisableDependencies);
#endif
_properties.Add(_propDisableMemoryCollection);
_properties.Add(_propDisableExpiration);
_properties.Add(_propPrivateBytesLimit);
_properties.Add(_propPercentagePhysicalMemoryUsedLimit);
_properties.Add(_propPrivateBytesPollTime);
}
public CacheSection() {
}
#if NOT_UNTIL_LATER
[ConfigurationProperty("cacheAPIEnabled", DefaultValue = true)]
public bool CacheAPIEnabled
{
get
{
return (bool)base[_propCacheAPIEnabled];
}
set
{
base[_propCacheAPIEnabled] = value;
}
}
#endif
[ConfigurationProperty("disableMemoryCollection", DefaultValue = false)]
public bool DisableMemoryCollection {
get {
return (bool)base[_propDisableMemoryCollection];
}
set {
base[_propDisableMemoryCollection] = value;
}
}
[ConfigurationProperty("disableExpiration", DefaultValue = false)]
public bool DisableExpiration {
get {
return (bool)base[_propDisableExpiration];
}
set {
base[_propDisableExpiration] = value;
}
}
#if NOT_UNTIL_LATER
[ConfigurationProperty("disableDependencies", DefaultValue = false)]
public bool DisableDependencies
{
get
{
return (bool)base[_propDisableDependencies];
}
set
{
base[_propDisableDependencies] = value;
}
}
#endif
[ConfigurationProperty("privateBytesLimit", DefaultValue = (long)0)]
[LongValidator(MinValue = 0)]
public long PrivateBytesLimit {
get {
return (long)base[_propPrivateBytesLimit];
}
set {
base[_propPrivateBytesLimit] = value;
}
}
[ConfigurationProperty("percentagePhysicalMemoryUsedLimit", DefaultValue = (int)0)]
[IntegerValidator(MinValue = 0, MaxValue = 100)]
public int PercentagePhysicalMemoryUsedLimit {
get {
return (int)base[_propPercentagePhysicalMemoryUsedLimit];
}
set {
base[_propPercentagePhysicalMemoryUsedLimit] = value;
}
}
protected override ConfigurationPropertyCollection Properties {
get {
return _properties;
}
}
[ConfigurationProperty("privateBytesPollTime", DefaultValue = "00:02:00")]
[TypeConverter(typeof(InfiniteTimeSpanConverter))]
public TimeSpan PrivateBytesPollTime {
get {
return (TimeSpan)base[_propPrivateBytesPollTime];
}
set {
base[_propPrivateBytesPollTime] = value;
}
}
}
}
// 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
- ConstructorExpr.cs
- ConfigurationStrings.cs
- DebugHandleTracker.cs
- MessageParameterAttribute.cs
- DeobfuscatingStream.cs
- ResourcesGenerator.cs
- ToolStripRendererSwitcher.cs
- ZipIOBlockManager.cs
- IIS7UserPrincipal.cs
- InstanceDataCollection.cs
- SafeNativeMethods.cs
- DocumentViewerBase.cs
- QuaternionAnimationBase.cs
- MembershipUser.cs
- TypeDescriptionProviderAttribute.cs
- SortedSetDebugView.cs
- DataGridState.cs
- exports.cs
- MasterPage.cs
- SafeWaitHandle.cs
- IIS7WorkerRequest.cs
- Renderer.cs
- InputScope.cs
- MouseGestureConverter.cs
- XmlSchemaObjectTable.cs
- SocketPermission.cs
- SoapSchemaMember.cs
- QuestionEventArgs.cs
- BufferBuilder.cs
- RequestSecurityTokenSerializer.cs
- DataGridLinkButton.cs
- HashSetDebugView.cs
- DbExpressionVisitor.cs
- CodeDirectiveCollection.cs
- ToolStripGripRenderEventArgs.cs
- RedirectionProxy.cs
- COM2EnumConverter.cs
- Parameter.cs
- XmlSchemaAttribute.cs
- AsyncPostBackErrorEventArgs.cs
- ScaleTransform.cs
- DataGridViewCellFormattingEventArgs.cs
- LocalizedNameDescriptionPair.cs
- MailMessage.cs
- IntSecurity.cs
- AssertFilter.cs
- WebPartHeaderCloseVerb.cs
- AQNBuilder.cs
- XmlSchemaAppInfo.cs
- RepeatButtonAutomationPeer.cs
- CommandLibraryHelper.cs
- IdleTimeoutMonitor.cs
- BoundsDrawingContextWalker.cs
- NonVisualControlAttribute.cs
- HMACSHA1.cs
- X509Utils.cs
- XappLauncher.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- SqlTransaction.cs
- Filter.cs
- AnnotationResource.cs
- SafeHandles.cs
- XmlDocument.cs
- WebServiceEnumData.cs
- FormsAuthenticationUser.cs
- EventLogPermission.cs
- DesignerView.xaml.cs
- PositiveTimeSpanValidatorAttribute.cs
- InvalidateEvent.cs
- SqlDataSourceFilteringEventArgs.cs
- JpegBitmapEncoder.cs
- HostExecutionContextManager.cs
- SHA1.cs
- PartitionedDataSource.cs
- HttpRequestBase.cs
- StylusEditingBehavior.cs
- EmptyReadOnlyDictionaryInternal.cs
- BinaryParser.cs
- RowUpdatedEventArgs.cs
- CacheRequest.cs
- FileReservationCollection.cs
- AppDomainFactory.cs
- UrlPath.cs
- PeerContact.cs
- PageCodeDomTreeGenerator.cs
- RadioButtonAutomationPeer.cs
- BlurEffect.cs
- ObjectParameter.cs
- WebColorConverter.cs
- RawKeyboardInputReport.cs
- WebEncodingValidator.cs
- SByteConverter.cs
- RequestCachePolicy.cs
- ProviderCollection.cs
- SynchronizedPool.cs
- AssemblyBuilder.cs
- TempFiles.cs
- SafeNativeMethodsOther.cs
- XMLSyntaxException.cs
- XmlSchemaImporter.cs