Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / SqlDataSourceCache.cs / 2 / SqlDataSourceCache.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System.Collections; using System.ComponentModel; using System.Web.Caching; internal sealed class SqlDataSourceCache : DataSourceCache { internal const string Sql9CacheDependencyDirective = "CommandNotification"; ////// A semi-colon delimited string indicating which databases to use for the dependency in the format "database1:table1;database2:table2". /// public string SqlCacheDependency { get { object o = ViewState["SqlCacheDependency"]; if (o != null) return (string)o; return String.Empty; } set { ViewState["SqlCacheDependency"] = value; } } #if !FEATURE_PAL // FEATURE_PAL does not fully enable SQL dependencies ////// Saves data to the ASP.NET cache using the specified key. /// protected override void SaveDataToCacheInternal(string key, object data, CacheDependency dependency) { string sqlCacheDependency = SqlCacheDependency; // Here we only create cache dependencies for SQL Server 2000 and // earlier that use a polling based mechanism. For SQL Server 2005 // and after, the data source itself creates the SqlCacheDependency // and passes it in as a parameter. if (sqlCacheDependency.Length > 0 && !String.Equals(sqlCacheDependency, Sql9CacheDependencyDirective, StringComparison.OrdinalIgnoreCase)) { // Call internal helper method to parse the dependency list CacheDependency sqlDependency = System.Web.Caching.SqlCacheDependency.CreateOutputCacheDependency(sqlCacheDependency); if (dependency != null) { // There was another dependency passed in, aggregate them AggregateCacheDependency aggregateDependency = new AggregateCacheDependency(); aggregateDependency.Add(sqlDependency, dependency); dependency = aggregateDependency; } else { // No other dependencies, just the SQL one dependency = sqlDependency; } } base.SaveDataToCacheInternal(key, data, dependency); } #endif // !FEATURE_PAL } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HTTPNotFoundHandler.cs
- MgmtConfigurationRecord.cs
- CursorConverter.cs
- SchemaComplexType.cs
- URLIdentityPermission.cs
- SimpleType.cs
- HttpPostClientProtocol.cs
- SafeReversePInvokeHandle.cs
- dbenumerator.cs
- RequestCacheEntry.cs
- HtmlInputButton.cs
- SelectionProcessor.cs
- DataListCommandEventArgs.cs
- MulticastOption.cs
- RoutingConfiguration.cs
- TemplateFactory.cs
- RoutedEventHandlerInfo.cs
- TableAdapterManagerNameHandler.cs
- Attribute.cs
- DateTimeSerializationSection.cs
- Pen.cs
- SpanIndex.cs
- CroppedBitmap.cs
- InputLanguageProfileNotifySink.cs
- SendMailErrorEventArgs.cs
- HashHelpers.cs
- WebPartVerbsEventArgs.cs
- ComboBoxItem.cs
- ObjectListFieldCollection.cs
- ToolStripItemClickedEventArgs.cs
- ReferenceSchema.cs
- DataGridViewRow.cs
- EnvelopeVersion.cs
- DataGridColumnDropSeparator.cs
- GenericTypeParameterConverter.cs
- DataTableMapping.cs
- UTF8Encoding.cs
- TrackingStringDictionary.cs
- NumericPagerField.cs
- SoapUnknownHeader.cs
- ListViewItem.cs
- DecimalFormatter.cs
- CollectionViewSource.cs
- SyndicationCategory.cs
- Hashtable.cs
- _Connection.cs
- WindowsSysHeader.cs
- MutexSecurity.cs
- EntityDataSourceDesigner.cs
- RectIndependentAnimationStorage.cs
- SiteMapDataSourceDesigner.cs
- LicenseProviderAttribute.cs
- StateChangeEvent.cs
- ImportRequest.cs
- CorrelationTokenInvalidatedHandler.cs
- EncryptedPackage.cs
- DesignerCategoryAttribute.cs
- EncodingInfo.cs
- DelegatingTypeDescriptionProvider.cs
- EditorBrowsableAttribute.cs
- ThemeInfoAttribute.cs
- IIS7WorkerRequest.cs
- SqlFactory.cs
- Timeline.cs
- Point.cs
- ScrollProviderWrapper.cs
- SqlMethods.cs
- TransformerInfo.cs
- SweepDirectionValidation.cs
- XmlNullResolver.cs
- ThreadExceptionEvent.cs
- DataReceivedEventArgs.cs
- XmlUtil.cs
- invalidudtexception.cs
- DataKeyArray.cs
- FormViewUpdateEventArgs.cs
- FamilyTypefaceCollection.cs
- LineSegment.cs
- XsdBuildProvider.cs
- DrawingContextDrawingContextWalker.cs
- SiteMapSection.cs
- BridgeDataRecord.cs
- CLSCompliantAttribute.cs
- MimeFormatter.cs
- EncryptedPackageFilter.cs
- DateTimeFormatInfo.cs
- StylusCollection.cs
- MsmqIntegrationElement.cs
- ServicesUtilities.cs
- Point.cs
- CustomPopupPlacement.cs
- CalendarDateChangedEventArgs.cs
- OperationGenerator.cs
- TextAdaptor.cs
- CollectionContainer.cs
- BigInt.cs
- BindingsCollection.cs
- securitycriticaldataClass.cs
- BindingCompleteEventArgs.cs
- Italic.cs