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
- UIElementParaClient.cs
- Double.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- ProfileInfo.cs
- WebPartTransformerAttribute.cs
- SystemIcmpV4Statistics.cs
- FaultPropagationQuery.cs
- NotifyInputEventArgs.cs
- WorkflowPrinting.cs
- TypeTypeConverter.cs
- PropertyAccessVisitor.cs
- ColumnTypeConverter.cs
- BamlRecordHelper.cs
- Overlapped.cs
- PrintPreviewGraphics.cs
- TextEditorTyping.cs
- CustomErrorsSection.cs
- MinimizableAttributeTypeConverter.cs
- SelectionListComponentEditor.cs
- CodeStatement.cs
- PeerNameResolver.cs
- TabControlAutomationPeer.cs
- HtmlTextBoxAdapter.cs
- ZipIOExtraFieldElement.cs
- AutomationElementIdentifiers.cs
- COM2TypeInfoProcessor.cs
- TextEffectCollection.cs
- ExpressionBindings.cs
- EmissiveMaterial.cs
- DocumentViewer.cs
- ListItem.cs
- DBSqlParserColumn.cs
- CLRBindingWorker.cs
- _NegotiateClient.cs
- DialogResultConverter.cs
- XmlDictionary.cs
- TitleStyle.cs
- BasicDesignerLoader.cs
- CaseStatement.cs
- EnumerableCollectionView.cs
- ThreadStaticAttribute.cs
- BitmapImage.cs
- MemberProjectionIndex.cs
- WinEventTracker.cs
- SafeTokenHandle.cs
- configsystem.cs
- CoTaskMemSafeHandle.cs
- WsdlImporterElement.cs
- ResolveCriteria11.cs
- ClusterSafeNativeMethods.cs
- StrokeCollectionConverter.cs
- ValidationSummary.cs
- UserControl.cs
- QuaternionRotation3D.cs
- HttpRequest.cs
- Matrix3D.cs
- ExecutedRoutedEventArgs.cs
- Point3DAnimationUsingKeyFrames.cs
- ValidatingPropertiesEventArgs.cs
- MatrixAnimationBase.cs
- ComEventsInfo.cs
- SmiMetaData.cs
- ApplicationFileParser.cs
- JsonFormatReaderGenerator.cs
- RichTextBox.cs
- ContextDataSourceView.cs
- ConfigXmlCDataSection.cs
- elementinformation.cs
- SQLByteStorage.cs
- Form.cs
- TextEditor.cs
- BackStopAuthenticationModule.cs
- ExtensibleClassFactory.cs
- XhtmlBasicTextBoxAdapter.cs
- ConfigurationCollectionAttribute.cs
- FolderBrowserDialog.cs
- SizeChangedInfo.cs
- TemplateControlBuildProvider.cs
- HttpFormatExtensions.cs
- XmlDocumentFragment.cs
- DependencyPropertyAttribute.cs
- DeclarativeCatalogPart.cs
- SkinIDTypeConverter.cs
- StrongNameUtility.cs
- BaseValidator.cs
- DataObjectCopyingEventArgs.cs
- FtpRequestCacheValidator.cs
- WebPartVerbsEventArgs.cs
- uribuilder.cs
- FormsAuthentication.cs
- Queue.cs
- SmtpDateTime.cs
- AesManaged.cs
- DataGridRowsPresenter.cs
- Hex.cs
- Message.cs
- ExpanderAutomationPeer.cs
- ParallelActivityDesigner.cs
- QilTernary.cs
- TextShapeableCharacters.cs