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
- SystemSounds.cs
- brushes.cs
- OracleConnection.cs
- ScriptComponentDescriptor.cs
- CompilerGeneratedAttribute.cs
- XmlSchemaComplexContentRestriction.cs
- WebDescriptionAttribute.cs
- SendMailErrorEventArgs.cs
- Comparer.cs
- XmlWrappingReader.cs
- AxisAngleRotation3D.cs
- unsafeIndexingFilterStream.cs
- DatagridviewDisplayedBandsData.cs
- GridViewCellAutomationPeer.cs
- NavigationProgressEventArgs.cs
- WebPartConnectVerb.cs
- ExecutionEngineException.cs
- XmlImplementation.cs
- DigestTraceRecordHelper.cs
- ApplicationId.cs
- ASCIIEncoding.cs
- ConstantExpression.cs
- ApplicationSecurityInfo.cs
- XhtmlBasicObjectListAdapter.cs
- Point4D.cs
- PerformanceCounterLib.cs
- ConnectionString.cs
- DbConnectionPoolOptions.cs
- NamedPermissionSet.cs
- SafeRightsManagementSessionHandle.cs
- ServiceOperation.cs
- HuffmanTree.cs
- ServiceDefaults.cs
- AutomationElementCollection.cs
- OdbcFactory.cs
- TemplateControlParser.cs
- _Rfc2616CacheValidators.cs
- EmptyQuery.cs
- MexBindingBindingCollectionElement.cs
- RadioButtonList.cs
- ValidationResult.cs
- SmtpReplyReader.cs
- BinaryMessageEncodingBindingElement.cs
- CommonRemoteMemoryBlock.cs
- WsrmMessageInfo.cs
- RemotingService.cs
- ListControl.cs
- SqlXmlStorage.cs
- ELinqQueryState.cs
- DrawingGroup.cs
- unitconverter.cs
- PartitionerStatic.cs
- InvokeGenerator.cs
- TextRangeAdaptor.cs
- Model3DGroup.cs
- HealthMonitoringSection.cs
- PartitionerQueryOperator.cs
- DataErrorValidationRule.cs
- ArgumentDirectionHelper.cs
- DataBindingHandlerAttribute.cs
- EncryptedData.cs
- WmlControlAdapter.cs
- Vector3dCollection.cs
- TypeUtils.cs
- OracleDateTime.cs
- TrackingServices.cs
- BatchWriter.cs
- NetCodeGroup.cs
- HyperLinkDesigner.cs
- FlagsAttribute.cs
- TextElementAutomationPeer.cs
- DataSourceCache.cs
- SqlErrorCollection.cs
- CategoryAttribute.cs
- StylusButton.cs
- QueryCacheManager.cs
- IpcServerChannel.cs
- SqlDependencyListener.cs
- DomainConstraint.cs
- WindowsListViewSubItem.cs
- XmlChildNodes.cs
- CustomTypeDescriptor.cs
- ConfigurationFileMap.cs
- CryptoConfig.cs
- TextProviderWrapper.cs
- WindowsListViewItemCheckBox.cs
- WebBaseEventKeyComparer.cs
- RootBrowserWindowProxy.cs
- BindingsCollection.cs
- DataGridViewLinkCell.cs
- SchemaElementDecl.cs
- ServerType.cs
- CodeNamespace.cs
- Byte.cs
- CodeSpit.cs
- SQLStringStorage.cs
- mactripleDES.cs
- RequestStatusBarUpdateEventArgs.cs
- ObjectStateEntryDbDataRecord.cs
- CatalogZoneBase.cs