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
- WebServiceEnumData.cs
- IncrementalHitTester.cs
- DesignerAutoFormatStyle.cs
- PartialCachingControl.cs
- ExecutionEngineException.cs
- xml.cs
- Comparer.cs
- CacheEntry.cs
- HtmlHead.cs
- Command.cs
- DataKeyCollection.cs
- ThemeableAttribute.cs
- SingleTagSectionHandler.cs
- SchemaMerger.cs
- SqlDataSourceCommandEventArgs.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- RC2.cs
- CodeArrayCreateExpression.cs
- InputMethodStateChangeEventArgs.cs
- SwitchExpression.cs
- WebRequest.cs
- DeploymentExceptionMapper.cs
- TransactedReceiveScope.cs
- WebAdminConfigurationHelper.cs
- ListViewItem.cs
- StatusBarPanel.cs
- VisualBasicSettingsHandler.cs
- HtmlElementEventArgs.cs
- WorkflowEnvironment.cs
- DriveInfo.cs
- GenericUriParser.cs
- RepeatEnumerable.cs
- Group.cs
- ObjectDataSourceSelectingEventArgs.cs
- TypeDescriptionProvider.cs
- DynamicActivityTypeDescriptor.cs
- NGCPageContentSerializerAsync.cs
- DataGridViewSortCompareEventArgs.cs
- PixelShader.cs
- SerializationInfo.cs
- TreeNodeStyle.cs
- AssemblyNameProxy.cs
- MethodToken.cs
- AmbiguousMatchException.cs
- BaseParser.cs
- DataControlFieldCollection.cs
- XDeferredAxisSource.cs
- GAC.cs
- RelationshipEndCollection.cs
- ChildChangedEventArgs.cs
- OnOperation.cs
- QilReplaceVisitor.cs
- AsymmetricCryptoHandle.cs
- RegexNode.cs
- SecuritySessionClientSettings.cs
- XmlWhitespace.cs
- Stream.cs
- KernelTypeValidation.cs
- ActivitySurrogate.cs
- NativeWindow.cs
- FormViewCommandEventArgs.cs
- wgx_exports.cs
- WebPartMovingEventArgs.cs
- MetadataArtifactLoaderCompositeResource.cs
- CodeMemberMethod.cs
- RoutedEvent.cs
- XsdCachingReader.cs
- MSAANativeProvider.cs
- HttpClientChannel.cs
- CryptographicAttribute.cs
- XmlException.cs
- DrawListViewSubItemEventArgs.cs
- DesignerActionListCollection.cs
- TdsParser.cs
- CornerRadiusConverter.cs
- XmlChoiceIdentifierAttribute.cs
- Ref.cs
- MenuItemBinding.cs
- AsymmetricSecurityProtocol.cs
- BinaryFormatterWriter.cs
- XPathSingletonIterator.cs
- DocumentPageViewAutomationPeer.cs
- ContainerControl.cs
- MachineSettingsSection.cs
- Matrix3DConverter.cs
- WebConfigurationFileMap.cs
- EnvelopedSignatureTransform.cs
- InsufficientMemoryException.cs
- ToolStripDropDownClosingEventArgs.cs
- ObjectStateManager.cs
- ScriptMethodAttribute.cs
- IdentityReference.cs
- CompilerCollection.cs
- DiagnosticTrace.cs
- PageSettings.cs
- SqlConnection.cs
- ISCIIEncoding.cs
- FactoryGenerator.cs
- TargetException.cs
- HeaderCollection.cs