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
- MailWebEventProvider.cs
- SwitchAttribute.cs
- DataViewListener.cs
- CalendarDesigner.cs
- XmlAutoDetectWriter.cs
- M3DUtil.cs
- ProcessHostMapPath.cs
- CompoundFileStorageReference.cs
- ControlType.cs
- MeasureData.cs
- UserControlParser.cs
- LogWriteRestartAreaState.cs
- Decimal.cs
- LazyLoadBehavior.cs
- XmlConvert.cs
- AuthenticatingEventArgs.cs
- UnitySerializationHolder.cs
- MinimizableAttributeTypeConverter.cs
- SerializationInfoEnumerator.cs
- _AutoWebProxyScriptHelper.cs
- SecurityRuntime.cs
- XPathDescendantIterator.cs
- IdnMapping.cs
- SqlDataSourceRefreshSchemaForm.cs
- DesignerView.Commands.cs
- TextBoxAutoCompleteSourceConverter.cs
- SQLChars.cs
- SystemFonts.cs
- FlowPosition.cs
- Int64AnimationBase.cs
- ScrollProperties.cs
- AggregateNode.cs
- PopupRoot.cs
- StrongNameIdentityPermission.cs
- TemplateBamlTreeBuilder.cs
- IndentTextWriter.cs
- ValidateNames.cs
- TableCell.cs
- GenerateScriptTypeAttribute.cs
- XmlEncodedRawTextWriter.cs
- DBDataPermissionAttribute.cs
- WebPartCatalogCloseVerb.cs
- EmissiveMaterial.cs
- DataRelationCollection.cs
- SerialPort.cs
- CellCreator.cs
- TextPatternIdentifiers.cs
- JsonReaderWriterFactory.cs
- RootAction.cs
- ConnectionStringsExpressionBuilder.cs
- SessionStateUtil.cs
- TreeChangeInfo.cs
- Brush.cs
- ProxyHelper.cs
- MulticastDelegate.cs
- InvalidOperationException.cs
- CngAlgorithmGroup.cs
- TextParagraphView.cs
- GridViewDeleteEventArgs.cs
- BitmapEffectGroup.cs
- Type.cs
- WebBrowserUriTypeConverter.cs
- GridViewEditEventArgs.cs
- InputReport.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- WindowsTab.cs
- NavigatingCancelEventArgs.cs
- FontDriver.cs
- Message.cs
- HttpMethodConstraint.cs
- FreeIndexList.cs
- FileEnumerator.cs
- FixedTextPointer.cs
- FrameworkName.cs
- SystemIcons.cs
- TimeZone.cs
- MatrixAnimationBase.cs
- DeviceContexts.cs
- TreeNodeCollection.cs
- WebPartCatalogCloseVerb.cs
- HandlerFactoryWrapper.cs
- SqlStream.cs
- Window.cs
- AudioFileOut.cs
- TreeNodeSelectionProcessor.cs
- PopOutPanel.cs
- DataSourceListEditor.cs
- WrappedDispatcherException.cs
- TableRowCollection.cs
- ServiceProviders.cs
- AttributeAction.cs
- KnownBoxes.cs
- DataGridViewElement.cs
- TemplatedAdorner.cs
- TextSimpleMarkerProperties.cs
- precedingquery.cs
- DataMisalignedException.cs
- TraceUtils.cs
- SafeTokenHandle.cs
- ObjectToModelValueConverter.cs