Code:
/ FX-1434 / FX-1434 / 1.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
- RuleSet.cs
- ResourceExpressionBuilder.cs
- MediaContext.cs
- HtmlElementErrorEventArgs.cs
- _AuthenticationState.cs
- Icon.cs
- Logging.cs
- SmuggledIUnknown.cs
- Point3DCollectionValueSerializer.cs
- MarkupCompilePass2.cs
- GridViewUpdatedEventArgs.cs
- BehaviorDragDropEventArgs.cs
- CompensatableTransactionScopeActivityDesigner.cs
- MappingMetadataHelper.cs
- _KerberosClient.cs
- GridViewColumnCollection.cs
- ResolveCriteriaApril2005.cs
- ExternalFile.cs
- FirstMatchCodeGroup.cs
- AnnotationComponentChooser.cs
- FontFamilyIdentifier.cs
- remotingproxy.cs
- CompatibleComparer.cs
- RegexRunnerFactory.cs
- PassportIdentity.cs
- PreProcessor.cs
- DbConnectionFactory.cs
- Opcode.cs
- RtType.cs
- ProgressBarHighlightConverter.cs
- _ListenerResponseStream.cs
- DocumentAutomationPeer.cs
- DependencyPropertyValueSerializer.cs
- AuthenticatingEventArgs.cs
- LoadRetryConstantStrategy.cs
- EmptyQuery.cs
- WebReferenceOptions.cs
- TableStyle.cs
- FileStream.cs
- ParsedAttributeCollection.cs
- WebHttpEndpoint.cs
- DataViewSetting.cs
- arc.cs
- WorkflowRuntime.cs
- DataGridAddNewRow.cs
- AppDomainAttributes.cs
- Point3DValueSerializer.cs
- SystemColors.cs
- AgileSafeNativeMemoryHandle.cs
- BindingValueChangedEventArgs.cs
- XPathNodeIterator.cs
- DrawingGroup.cs
- ListBoxItem.cs
- DiscoveryRequestHandler.cs
- BaseDataList.cs
- InputEventArgs.cs
- UpdateTracker.cs
- DocumentApplicationJournalEntry.cs
- SuppressMergeCheckAttribute.cs
- DesignSurfaceCollection.cs
- Matrix.cs
- TdsRecordBufferSetter.cs
- MessageAction.cs
- SettingsProviderCollection.cs
- ImpersonateTokenRef.cs
- ExceptionUtil.cs
- ScriptManagerProxy.cs
- ToolStripPanelCell.cs
- IpcClientManager.cs
- ProcessModelSection.cs
- DockPanel.cs
- MissingSatelliteAssemblyException.cs
- sqlpipe.cs
- Span.cs
- WebProxyScriptElement.cs
- ErrorRuntimeConfig.cs
- Panel.cs
- DataGridPagerStyle.cs
- COM2EnumConverter.cs
- AutomationAttributeInfo.cs
- ListBindingHelper.cs
- Serializer.cs
- TextServicesDisplayAttributePropertyRanges.cs
- IgnoreFileBuildProvider.cs
- EditorZoneBase.cs
- TargetControlTypeAttribute.cs
- PersonalizationProviderCollection.cs
- DispatcherHooks.cs
- MonthChangedEventArgs.cs
- ServiceNotStartedException.cs
- WebPartTracker.cs
- RelatedEnd.cs
- SchemaEntity.cs
- XmlnsPrefixAttribute.cs
- SqlRemoveConstantOrderBy.cs
- UnicastIPAddressInformationCollection.cs
- PropertyGeneratedEventArgs.cs
- IPipelineRuntime.cs
- SessionEndingCancelEventArgs.cs
- StateMachineWorkflowDesigner.cs