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
- DBAsyncResult.cs
- COM2ComponentEditor.cs
- UserPersonalizationStateInfo.cs
- WebPartUserCapability.cs
- Expressions.cs
- TemplateControlCodeDomTreeGenerator.cs
- TemplateKey.cs
- AssemblyCollection.cs
- ModuleBuilder.cs
- MetadataArtifactLoaderCompositeFile.cs
- LocalizeDesigner.cs
- WpfWebRequestHelper.cs
- FunctionParameter.cs
- BevelBitmapEffect.cs
- SimpleMailWebEventProvider.cs
- RedirectionProxy.cs
- SectionInput.cs
- RequestTimeoutManager.cs
- RSAPKCS1KeyExchangeFormatter.cs
- EventlogProvider.cs
- FileChangesMonitor.cs
- UnmanagedMemoryStreamWrapper.cs
- PanelStyle.cs
- TextSearch.cs
- DataBoundLiteralControl.cs
- SymDocumentType.cs
- PlanCompilerUtil.cs
- namescope.cs
- FactoryRecord.cs
- ObjectToken.cs
- XmlSchemaAnyAttribute.cs
- PingReply.cs
- UIElementCollection.cs
- ImageAutomationPeer.cs
- PriorityChain.cs
- ApplicationCommands.cs
- SMSvcHost.cs
- DefaultProxySection.cs
- DataGridViewCheckBoxCell.cs
- KnownTypeHelper.cs
- Line.cs
- WebBrowserPermission.cs
- Transform3DGroup.cs
- TraceContextRecord.cs
- PrintDialogException.cs
- RenderData.cs
- OleServicesContext.cs
- Transform3DGroup.cs
- ApplyImportsAction.cs
- ClientProtocol.cs
- JsonSerializer.cs
- UpdateCommandGenerator.cs
- ElementAction.cs
- MonikerBuilder.cs
- Ipv6Element.cs
- CorrelationKeyCalculator.cs
- CommentEmitter.cs
- Maps.cs
- TreeViewHitTestInfo.cs
- DoubleCollectionConverter.cs
- XmlLoader.cs
- RecognizerBase.cs
- Scripts.cs
- XPathNode.cs
- InputReportEventArgs.cs
- CodeNamespaceCollection.cs
- _NtlmClient.cs
- WindowsRegion.cs
- TextEditorDragDrop.cs
- columnmapfactory.cs
- MeshGeometry3D.cs
- CalculatedColumn.cs
- ProcessModuleCollection.cs
- SchemaImporter.cs
- CompilerResults.cs
- RawStylusSystemGestureInputReport.cs
- QuerySubExprEliminator.cs
- X509SecurityTokenAuthenticator.cs
- SvcMapFileLoader.cs
- SqlUserDefinedTypeAttribute.cs
- DataGridViewIntLinkedList.cs
- FontDialog.cs
- QilIterator.cs
- DbConnectionInternal.cs
- BrowserCapabilitiesFactory.cs
- MsmqIntegrationSecurityMode.cs
- WmlFormAdapter.cs
- SingleAnimationUsingKeyFrames.cs
- SecurityContext.cs
- TypeDescriptionProvider.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- TextDecorationCollection.cs
- HostingEnvironmentSection.cs
- SiteIdentityPermission.cs
- UserCancellationException.cs
- ToolStripPanelDesigner.cs
- XPathCompileException.cs
- HttpProcessUtility.cs
- LassoHelper.cs
- CriticalHandle.cs