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
- ProtocolException.cs
- CircleHotSpot.cs
- BindingOperations.cs
- KernelTypeValidation.cs
- TranslateTransform3D.cs
- SrgsNameValueTag.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- CompilationRelaxations.cs
- HtmlInputReset.cs
- CollectionContainer.cs
- EmulateRecognizeCompletedEventArgs.cs
- JournalEntryListConverter.cs
- EdmToObjectNamespaceMap.cs
- ExtensionFile.cs
- Knowncolors.cs
- BitmapSizeOptions.cs
- WindowsListViewItemCheckBox.cs
- TreeNode.cs
- XmlQueryContext.cs
- RolePrincipal.cs
- NavigateEvent.cs
- DetailsViewDesigner.cs
- BuiltInExpr.cs
- TrackingParticipant.cs
- HttpCachePolicyBase.cs
- PeerObject.cs
- CacheEntry.cs
- CompositionTarget.cs
- TemplateColumn.cs
- EntityDataSourceDataSelection.cs
- Operator.cs
- GradientStop.cs
- SingleConverter.cs
- FlowDecisionDesigner.xaml.cs
- PixelFormat.cs
- DropShadowEffect.cs
- AccessedThroughPropertyAttribute.cs
- PolicyValidationException.cs
- MetabaseServerConfig.cs
- MenuDesigner.cs
- TypeElementCollection.cs
- AjaxFrameworkAssemblyAttribute.cs
- SplitterEvent.cs
- KeyValueConfigurationElement.cs
- XmlSchemaSimpleTypeRestriction.cs
- ZipIOLocalFileBlock.cs
- ProxyHelper.cs
- XamlParser.cs
- SoapElementAttribute.cs
- printdlgexmarshaler.cs
- CatalogZoneAutoFormat.cs
- ListViewGroupConverter.cs
- Component.cs
- UIElementAutomationPeer.cs
- WebPartMenu.cs
- AspNetSynchronizationContext.cs
- ObjectPersistData.cs
- ConnectionPoint.cs
- DesignerHost.cs
- ImmutableDispatchRuntime.cs
- GlyphTypeface.cs
- ArgIterator.cs
- FileRecordSequenceCompletedAsyncResult.cs
- StylusCollection.cs
- GridPatternIdentifiers.cs
- ButtonField.cs
- DialogResultConverter.cs
- ReflectionServiceProvider.cs
- TextFormatterContext.cs
- AsyncPostBackTrigger.cs
- FormClosedEvent.cs
- ExpressionParser.cs
- ObjectContext.cs
- BindingMAnagerBase.cs
- SafeUserTokenHandle.cs
- Scene3D.cs
- XPathScanner.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- TranslateTransform.cs
- HelpInfo.cs
- ObjectSet.cs
- ParserExtension.cs
- CellCreator.cs
- InputLanguageEventArgs.cs
- XmlNodeList.cs
- PolicyUnit.cs
- FormattedText.cs
- ToolStripRenderer.cs
- XmlExpressionDumper.cs
- TemplateControl.cs
- IFlowDocumentViewer.cs
- XmlBinaryReader.cs
- BaseTemplateCodeDomTreeGenerator.cs
- XmlTextEncoder.cs
- TypeDependencyAttribute.cs
- ProxyManager.cs
- XmlSchemaGroupRef.cs
- DateTimeStorage.cs
- DataColumnPropertyDescriptor.cs
- SqlProviderUtilities.cs