Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DesignerSerializationOptionsAttribute.cs
- DataGridViewBand.cs
- ValidatorCompatibilityHelper.cs
- FastEncoderWindow.cs
- Button.cs
- PerspectiveCamera.cs
- EventTask.cs
- OneOfTypeConst.cs
- Image.cs
- SafeFileMapViewHandle.cs
- ItemsControl.cs
- ComponentChangingEvent.cs
- AffineTransform3D.cs
- MobileControlsSectionHelper.cs
- ConfigXmlAttribute.cs
- EastAsianLunisolarCalendar.cs
- SkinBuilder.cs
- SqlCacheDependencyDatabase.cs
- StreamReader.cs
- DrawingBrush.cs
- MetadataPropertyAttribute.cs
- ACE.cs
- ListViewPagedDataSource.cs
- SetterBaseCollection.cs
- WindowsGrip.cs
- SqlDataSourceStatusEventArgs.cs
- InfoCardClaim.cs
- WindowsAltTab.cs
- FlowLayout.cs
- SoapRpcMethodAttribute.cs
- PrivilegedConfigurationManager.cs
- Statements.cs
- ListBoxItemWrapperAutomationPeer.cs
- SimpleBitVector32.cs
- IIS7WorkerRequest.cs
- RecordBuilder.cs
- DbMetaDataFactory.cs
- DBCommand.cs
- SoapParser.cs
- MultiBindingExpression.cs
- TemplateField.cs
- InputGestureCollection.cs
- SHA256Managed.cs
- XmlResolver.cs
- CuspData.cs
- ComplexType.cs
- ConsoleCancelEventArgs.cs
- HtmlInputRadioButton.cs
- PrinterUnitConvert.cs
- DataGridCommandEventArgs.cs
- RequestQueue.cs
- Container.cs
- DeclarationUpdate.cs
- PersonalizationStateQuery.cs
- SecurityTokenRequirement.cs
- ProfileSettingsCollection.cs
- GridViewDeleteEventArgs.cs
- CmsInterop.cs
- EditingScopeUndoUnit.cs
- formatter.cs
- PointCollectionValueSerializer.cs
- DesignerCategoryAttribute.cs
- DesignTimeData.cs
- Util.cs
- XmlSchema.cs
- RestHandler.cs
- StateManagedCollection.cs
- DataError.cs
- TextBreakpoint.cs
- MatrixTransform.cs
- AnimationClock.cs
- XamlLoadErrorInfo.cs
- UpdateManifestForBrowserApplication.cs
- OperationCanceledException.cs
- MenuItemCollectionEditor.cs
- UIElementPropertyUndoUnit.cs
- Visitor.cs
- SolidColorBrush.cs
- HeaderedContentControl.cs
- DataServiceProcessingPipeline.cs
- SessionIDManager.cs
- ButtonChrome.cs
- WebProxyScriptElement.cs
- Interlocked.cs
- WindowsComboBox.cs
- SplineQuaternionKeyFrame.cs
- TableLayout.cs
- ListSourceHelper.cs
- XmlComplianceUtil.cs
- BufferedResponseStream.cs
- TemplatedWizardStep.cs
- SqlInternalConnection.cs
- FileDetails.cs
- SelectedGridItemChangedEvent.cs
- FullTextState.cs
- StateFinalizationDesigner.cs
- HttpGetClientProtocol.cs
- PathGeometry.cs
- PromptStyle.cs
- RemoteWebConfigurationHostServer.cs