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
- SqlMethodCallConverter.cs
- XmlSerializationWriter.cs
- ContactManager.cs
- SortKey.cs
- DecimalAnimationUsingKeyFrames.cs
- CursorEditor.cs
- SelectionHighlightInfo.cs
- DES.cs
- HttpGetServerProtocol.cs
- ExceptionHelpers.cs
- ViewPort3D.cs
- WindowsSecurityToken.cs
- ToolStripLocationCancelEventArgs.cs
- UITypeEditor.cs
- QueryInterceptorAttribute.cs
- MissingMemberException.cs
- GridPattern.cs
- ProfileBuildProvider.cs
- CodeVariableDeclarationStatement.cs
- SrgsText.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- ConfigPathUtility.cs
- NativeMethods.cs
- SQLInt16.cs
- EntityContainerEmitter.cs
- ScriptResourceAttribute.cs
- autovalidator.cs
- NavigationWindowAutomationPeer.cs
- DefaultDiscoveryServiceExtension.cs
- PreservationFileWriter.cs
- HtmlTable.cs
- CompressedStack.cs
- AsyncResult.cs
- TransformerInfoCollection.cs
- Graph.cs
- Tool.cs
- FormsIdentity.cs
- PartialTrustVisibleAssembly.cs
- KeyConverter.cs
- SqlTransaction.cs
- LayoutDump.cs
- XmlTextWriter.cs
- Stroke2.cs
- ExternalFile.cs
- ThemeableAttribute.cs
- ProfileManager.cs
- MultilineStringConverter.cs
- UnsafeNativeMethods.cs
- Grant.cs
- TableHeaderCell.cs
- AnnotationAdorner.cs
- Win32PrintDialog.cs
- EnumMemberAttribute.cs
- ProgressiveCrcCalculatingStream.cs
- PolyQuadraticBezierSegment.cs
- RTLAwareMessageBox.cs
- SqlProfileProvider.cs
- OleDbError.cs
- Screen.cs
- NavigationPropertyEmitter.cs
- BitmapPalette.cs
- Number.cs
- SerTrace.cs
- DragStartedEventArgs.cs
- SHA1CryptoServiceProvider.cs
- Metafile.cs
- QuadraticBezierSegment.cs
- KeyValueConfigurationCollection.cs
- Encoder.cs
- CodeObjectCreateExpression.cs
- ConfigurationStrings.cs
- Schedule.cs
- GraphicsState.cs
- SmtpNegotiateAuthenticationModule.cs
- KoreanCalendar.cs
- CDSsyncETWBCLProvider.cs
- XmlAttributes.cs
- FileDialog.cs
- SpecularMaterial.cs
- MessageBodyDescription.cs
- XmlSchemaAppInfo.cs
- ContentFilePart.cs
- BlobPersonalizationState.cs
- RuntimeIdentifierPropertyAttribute.cs
- CollectionBuilder.cs
- LambdaCompiler.Expressions.cs
- DebuggerAttributes.cs
- DeferredTextReference.cs
- FlowDocumentScrollViewer.cs
- EmptyControlCollection.cs
- StyleSheetRefUrlEditor.cs
- AuthorizationRule.cs
- DrawingAttributeSerializer.cs
- HttpDebugHandler.cs
- VisualStyleElement.cs
- XsltException.cs
- FixUpCollection.cs
- ProfileGroupSettingsCollection.cs
- XamlDesignerSerializationManager.cs
- TextContainerChangeEventArgs.cs