Code:
/ DotNET / DotNET / 8.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
- DataDesignUtil.cs
- SecurityContext.cs
- FeatureAttribute.cs
- Condition.cs
- XmlChildNodes.cs
- DocumentViewerAutomationPeer.cs
- ParsedRoute.cs
- XhtmlBasicControlAdapter.cs
- FrameworkReadOnlyPropertyMetadata.cs
- GroupItemAutomationPeer.cs
- WebPartZone.cs
- ErrorInfoXmlDocument.cs
- XpsFontSubsetter.cs
- ExpressionBinding.cs
- XmlEventCache.cs
- PropertyEntry.cs
- SoapCodeExporter.cs
- ReceiveMessageAndVerifySecurityAsyncResultBase.cs
- RequestQueryParser.cs
- UIElement3D.cs
- QuaternionRotation3D.cs
- safemediahandle.cs
- Compensation.cs
- FormatterServices.cs
- AmbientValueAttribute.cs
- WindowsEditBox.cs
- HtmlInputButton.cs
- BamlLocalizationDictionary.cs
- UserControl.cs
- CustomErrorsSectionWrapper.cs
- PersistenceTypeAttribute.cs
- XmlAnyElementAttribute.cs
- ObjectHandle.cs
- Pointer.cs
- LineVisual.cs
- BitmapEffectInput.cs
- ExpressionBuilder.cs
- ColorMatrix.cs
- DesigntimeLicenseContext.cs
- XPathQueryGenerator.cs
- Compiler.cs
- SafeFileMapViewHandle.cs
- DataKey.cs
- SchemaLookupTable.cs
- TextSelection.cs
- DoubleStorage.cs
- CloudCollection.cs
- TreeBuilder.cs
- ComplexLine.cs
- HandleValueEditor.cs
- SystemIPv4InterfaceProperties.cs
- WindowsBrush.cs
- ParameterDataSourceExpression.cs
- BinaryWriter.cs
- ModelUIElement3D.cs
- RadioButtonStandardAdapter.cs
- SelectionRangeConverter.cs
- _ConnectionGroup.cs
- CodeMemberProperty.cs
- EventProviderBase.cs
- FieldTemplateUserControl.cs
- ColorAnimationUsingKeyFrames.cs
- LocatorPart.cs
- mediaeventargs.cs
- DataStreams.cs
- ManagementClass.cs
- SqlAggregateChecker.cs
- Stacktrace.cs
- AuthenticationConfig.cs
- FilterUserControlBase.cs
- InfoCardX509Validator.cs
- SizeChangedEventArgs.cs
- ViewStateModeByIdAttribute.cs
- MissingManifestResourceException.cs
- WorkflowHostingResponseContext.cs
- OrderPreservingPipeliningMergeHelper.cs
- ArgumentElement.cs
- ColumnPropertiesGroup.cs
- EditorPartCollection.cs
- MatrixCamera.cs
- XmlUnspecifiedAttribute.cs
- RadioButton.cs
- SafeMarshalContext.cs
- ResourceExpression.cs
- Configuration.cs
- SecurityContextSecurityTokenParameters.cs
- PerformanceCounterLib.cs
- RoleGroupCollection.cs
- WebEncodingValidatorAttribute.cs
- ProtocolsConfigurationHandler.cs
- XmlSchemaAll.cs
- dataprotectionpermissionattribute.cs
- BehaviorEditorPart.cs
- WebPartConnectVerb.cs
- DrawTreeNodeEventArgs.cs
- AnnotationResourceCollection.cs
- ProbeMatches11.cs
- LineInfo.cs
- RadioButton.cs
- AssemblyAssociatedContentFileAttribute.cs