Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / SqlDataSourceCache.cs / 1 / 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 } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Type.cs
- DataFieldConverter.cs
- WebPartConnectionsDisconnectVerb.cs
- RuleDefinitions.cs
- DataGridViewDataErrorEventArgs.cs
- ToolStripDropTargetManager.cs
- DeclaredTypeElementCollection.cs
- validationstate.cs
- WorkflowTransactionService.cs
- QueryOutputWriter.cs
- PageThemeCodeDomTreeGenerator.cs
- EncryptedData.cs
- UnmanagedMemoryStream.cs
- InteropBitmapSource.cs
- TimeoutValidationAttribute.cs
- SecurityRuntime.cs
- LabelDesigner.cs
- MsmqException.cs
- FormsIdentity.cs
- TreeViewImageIndexConverter.cs
- Group.cs
- CompositionDesigner.cs
- CompilerParameters.cs
- WebPartEditorApplyVerb.cs
- FontEmbeddingManager.cs
- Crc32Helper.cs
- VoiceSynthesis.cs
- WebServiceEnumData.cs
- SqlProviderManifest.cs
- EventLogRecord.cs
- JsonClassDataContract.cs
- RepeaterItemEventArgs.cs
- SubMenuStyleCollection.cs
- LookupTables.cs
- MatchingStyle.cs
- FlowchartStart.xaml.cs
- ManualResetEvent.cs
- SchemaImporter.cs
- ScrollPattern.cs
- RangeBaseAutomationPeer.cs
- TypedDataSetSchemaImporterExtension.cs
- SafeRegistryKey.cs
- QueryAccessibilityHelpEvent.cs
- Effect.cs
- LogReserveAndAppendState.cs
- ChtmlSelectionListAdapter.cs
- NavigateEvent.cs
- IChannel.cs
- TextDecorationUnitValidation.cs
- PropertyFilterAttribute.cs
- Transform.cs
- CollectionViewProxy.cs
- JournalNavigationScope.cs
- TheQuery.cs
- HtmlElementEventArgs.cs
- KnownBoxes.cs
- AstTree.cs
- OdbcStatementHandle.cs
- SafeFileMappingHandle.cs
- SafeThreadHandle.cs
- bindurihelper.cs
- Inline.cs
- Blend.cs
- CompleteWizardStep.cs
- SqlInternalConnection.cs
- PackagePartCollection.cs
- FixedPageProcessor.cs
- PreservationFileReader.cs
- SqlWriter.cs
- DataList.cs
- Literal.cs
- TextBoxBase.cs
- MemberCollection.cs
- Splitter.cs
- TextElementCollection.cs
- DataRecord.cs
- StateRuntime.cs
- PhysicalFontFamily.cs
- SiteMapNode.cs
- TextElementAutomationPeer.cs
- EntityDataSourceConfigureObjectContext.cs
- Effect.cs
- CopyAction.cs
- HitTestParameters3D.cs
- QuaternionAnimation.cs
- SpeechSynthesizer.cs
- TogglePatternIdentifiers.cs
- Vector3DAnimationUsingKeyFrames.cs
- SHA384.cs
- InvalidPrinterException.cs
- GeneralTransform3DTo2D.cs
- MetabaseServerConfig.cs
- Byte.cs
- BooleanAnimationBase.cs
- Schema.cs
- TextBox.cs
- NamespaceList.cs
- DateTimeValueSerializerContext.cs
- PrimaryKeyTypeConverter.cs
- CustomAttributeFormatException.cs