Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / FileDataSourceCache.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EncryptedPackage.cs
- XmlSchemaNotation.cs
- RightsManagementPermission.cs
- DSASignatureFormatter.cs
- ObjectDataSourceSelectingEventArgs.cs
- BitmapImage.cs
- ExpressionEditorAttribute.cs
- InternalConfigConfigurationFactory.cs
- TargetControlTypeAttribute.cs
- QilSortKey.cs
- SoapExtensionTypeElementCollection.cs
- TaskScheduler.cs
- SafeNativeMethods.cs
- PackageRelationshipCollection.cs
- CqlErrorHelper.cs
- SchemaDeclBase.cs
- Stroke.cs
- UInt32Converter.cs
- SQLInt16.cs
- RemoteAsymmetricSignatureFormatter.cs
- InfoCardSymmetricAlgorithm.cs
- LinqDataSourceContextEventArgs.cs
- XPathNavigatorKeyComparer.cs
- WsdlContractConversionContext.cs
- KeyConverter.cs
- Binding.cs
- LassoHelper.cs
- ObjectListField.cs
- UrlPropertyAttribute.cs
- ObjectDataSourceView.cs
- DecimalAnimationBase.cs
- StandardCommands.cs
- HotCommands.cs
- DriveNotFoundException.cs
- InkCanvasInnerCanvas.cs
- base64Transforms.cs
- HtmlImage.cs
- WindowsAuthenticationEventArgs.cs
- GeometryCollection.cs
- _NestedMultipleAsyncResult.cs
- ToolBarButtonClickEvent.cs
- FileRecordSequence.cs
- Rectangle.cs
- AutomationElementIdentifiers.cs
- ParseHttpDate.cs
- UInt16.cs
- Registration.cs
- CharacterHit.cs
- HostedBindingBehavior.cs
- PinnedBufferMemoryStream.cs
- AttributeCollection.cs
- ReferenceSchema.cs
- BinaryMessageEncodingBindingElement.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- SpotLight.cs
- UseAttributeSetsAction.cs
- COM2ComponentEditor.cs
- XmlDataSourceView.cs
- DesignerActionPropertyItem.cs
- DistinctQueryOperator.cs
- BrowserCapabilitiesFactoryBase.cs
- HttpInputStream.cs
- SimpleWebHandlerParser.cs
- AnnotationMap.cs
- GotoExpression.cs
- PathNode.cs
- GatewayDefinition.cs
- ClientScriptManager.cs
- EntityClassGenerator.cs
- ListViewSortEventArgs.cs
- webeventbuffer.cs
- SynchronizationLockException.cs
- FormClosingEvent.cs
- TextAutomationPeer.cs
- SQLByteStorage.cs
- QueryContinueDragEventArgs.cs
- PropertyChangedEventManager.cs
- CompiledWorkflowDefinitionContext.cs
- TraceAsyncResult.cs
- DebuggerService.cs
- XmlDataSource.cs
- DbConvert.cs
- PluralizationService.cs
- FontConverter.cs
- KnownTypesProvider.cs
- SuppressMergeCheckAttribute.cs
- InvalidOleVariantTypeException.cs
- HitTestParameters.cs
- BuildDependencySet.cs
- TypeInformation.cs
- ObjectCloneHelper.cs
- OutputBuffer.cs
- FormViewUpdateEventArgs.cs
- RoutedEvent.cs
- QilStrConcat.cs
- Column.cs
- LinkedResourceCollection.cs
- XmlSchemaCompilationSettings.cs
- Mutex.cs
- TransformPatternIdentifiers.cs