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
- SqlUserDefinedTypeAttribute.cs
- Vector.cs
- D3DImage.cs
- XmlSchemaSequence.cs
- ServiceOperationHelpers.cs
- ListBindableAttribute.cs
- MarkerProperties.cs
- DBNull.cs
- WsdlBuildProvider.cs
- ProviderException.cs
- JournalEntry.cs
- URLBuilder.cs
- ListControlStringCollectionEditor.cs
- DbBuffer.cs
- GroupStyle.cs
- Lazy.cs
- XPathNodePointer.cs
- HttpValueCollection.cs
- HttpListenerResponse.cs
- MatrixKeyFrameCollection.cs
- UrlUtility.cs
- LocalValueEnumerator.cs
- PeerObject.cs
- SqlTypesSchemaImporter.cs
- SymbolMethod.cs
- Timer.cs
- EditCommandColumn.cs
- HttpHandlerActionCollection.cs
- UpdateExpressionVisitor.cs
- Size.cs
- XmlAttributeProperties.cs
- Model3DCollection.cs
- XmlUtf8RawTextWriter.cs
- BoundingRectTracker.cs
- LockCookie.cs
- ConstraintEnumerator.cs
- UnaryOperationBinder.cs
- PanelDesigner.cs
- ConstructorNeedsTagAttribute.cs
- BasicBrowserDialog.designer.cs
- BaseParser.cs
- IsolationInterop.cs
- TrackingServices.cs
- XmlAnyAttributeAttribute.cs
- CalendarDateRange.cs
- SecurityTraceRecordHelper.cs
- IntegerFacetDescriptionElement.cs
- UInt32.cs
- IPPacketInformation.cs
- BamlBinaryWriter.cs
- DesignerView.Commands.cs
- SchemaMerger.cs
- WebControl.cs
- ReadOnlyHierarchicalDataSourceView.cs
- AppDomainAttributes.cs
- ProvidersHelper.cs
- XmlSchemaSimpleContent.cs
- SystemBrushes.cs
- WebPartConnectionsConnectVerb.cs
- SqlClientWrapperSmiStream.cs
- EdmScalarPropertyAttribute.cs
- XmlExceptionHelper.cs
- XmlSerializerVersionAttribute.cs
- IMembershipProvider.cs
- InfocardChannelParameter.cs
- Soap.cs
- AstTree.cs
- Themes.cs
- InlinedAggregationOperator.cs
- DataSourceConverter.cs
- PrimitiveXmlSerializers.cs
- IPAddress.cs
- EmissiveMaterial.cs
- Stream.cs
- MetadataConversionError.cs
- DataObjectCopyingEventArgs.cs
- XPathNodePointer.cs
- GeometryCollection.cs
- _CookieModule.cs
- ToggleButtonAutomationPeer.cs
- GridViewSortEventArgs.cs
- SystemResourceKey.cs
- SQLRoleProvider.cs
- FactoryId.cs
- KnownColorTable.cs
- DbgUtil.cs
- BitmapEffectGeneralTransform.cs
- BezierSegment.cs
- TableItemStyle.cs
- SmiGettersStream.cs
- PropagatorResult.cs
- ArraySegment.cs
- MenuCommand.cs
- ImmComposition.cs
- SerialErrors.cs
- WmlPanelAdapter.cs
- ThreadStateException.cs
- MimeParameterWriter.cs
- ErrorFormatter.cs
- PagedDataSource.cs