Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / FileDataSourceCache.cs / 1 / FileDataSourceCache.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System.Collections.Specialized; using System.Web.Caching; internal sealed class FileDataSourceCache : DataSourceCache { private StringCollection _fileDependencies; ////// Sets the list of files that the cache entry will be dependent on. /// These values are not stored in view state. /// public StringCollection FileDependencies { get { if (_fileDependencies == null) { _fileDependencies = new StringCollection(); } return _fileDependencies; } } ////// Saves data to the ASP.NET cache using the specified key. /// protected override void SaveDataToCacheInternal(string key, object data, CacheDependency dependency) { int fileCount = FileDependencies.Count; string[] filenames = new string[fileCount]; FileDependencies.CopyTo(filenames, 0); CacheDependency fileDependency = new CacheDependency(0, filenames); if (dependency != null) { // There was another dependency passed in, aggregate them AggregateCacheDependency aggregateDependency = new AggregateCacheDependency(); aggregateDependency.Add(fileDependency, dependency); dependency = aggregateDependency; } else { // No other dependencies, just the file one dependency = fileDependency; } base.SaveDataToCacheInternal(key, data, dependency); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DrawingImage.cs
- EventInfo.cs
- MultipleViewProviderWrapper.cs
- XmlAutoDetectWriter.cs
- MailAddress.cs
- MonitorWrapper.cs
- WpfXamlType.cs
- NavigateEvent.cs
- BinaryMethodMessage.cs
- Random.cs
- BindingExpressionUncommonField.cs
- Subset.cs
- SQLInt64.cs
- ProcessHostMapPath.cs
- MetadataLocation.cs
- TraceSection.cs
- ListViewSortEventArgs.cs
- XmlUnspecifiedAttribute.cs
- IPCCacheManager.cs
- CurrencyWrapper.cs
- sqlinternaltransaction.cs
- PageBuildProvider.cs
- Propagator.cs
- SchemaEntity.cs
- MetafileHeader.cs
- StatusBarDrawItemEvent.cs
- KnownTypeHelper.cs
- SqlUserDefinedTypeAttribute.cs
- TemplatedEditableDesignerRegion.cs
- WebConfigurationHostFileChange.cs
- DbProviderServices.cs
- storepermissionattribute.cs
- ConsoleCancelEventArgs.cs
- TouchFrameEventArgs.cs
- XmlWrappingReader.cs
- OpenFileDialog.cs
- NetworkStream.cs
- DesignerView.Commands.cs
- DbProviderConfigurationHandler.cs
- CoreSwitches.cs
- Regex.cs
- DataRelationPropertyDescriptor.cs
- Rotation3D.cs
- Module.cs
- OSFeature.cs
- InternalPolicyElement.cs
- PolyLineSegmentFigureLogic.cs
- HttpSessionStateWrapper.cs
- RenderOptions.cs
- MultiByteCodec.cs
- DataGridItemEventArgs.cs
- X500Name.cs
- ConnectionOrientedTransportManager.cs
- TextParagraphProperties.cs
- IArgumentProvider.cs
- NamedPipeProcessProtocolHandler.cs
- ColorAnimation.cs
- ContextCorrelationInitializer.cs
- CalendarDesigner.cs
- OutputCacheModule.cs
- GenericTextProperties.cs
- AccessibleObject.cs
- NetTcpSecurityElement.cs
- ConfigurationElementCollection.cs
- Semaphore.cs
- Debug.cs
- ScriptResourceHandler.cs
- XmlILModule.cs
- DispatcherExceptionEventArgs.cs
- AnnotationHighlightLayer.cs
- OperatingSystem.cs
- PeerNameRecordCollection.cs
- Shape.cs
- InputScopeAttribute.cs
- DefaultEventAttribute.cs
- BamlCollectionHolder.cs
- TypeContext.cs
- Button.cs
- cookiecollection.cs
- SHA1CryptoServiceProvider.cs
- EventEntry.cs
- File.cs
- DragSelectionMessageFilter.cs
- ExeContext.cs
- ControlsConfig.cs
- QueryInterceptorAttribute.cs
- SectionInformation.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- CellTreeSimplifier.cs
- HtmlFormParameterReader.cs
- WindowAutomationPeer.cs
- AnnouncementInnerClient11.cs
- SingleSelectRootGridEntry.cs
- ConfigurationStrings.cs
- unitconverter.cs
- ExpressionBuilderContext.cs
- ModuleBuilderData.cs
- BasicBrowserDialog.cs
- EmptyEnumerable.cs
- ExpandCollapseProviderWrapper.cs