Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Common / QueryCache / QueryCacheKey.cs / 1305376 / QueryCacheKey.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- namespace System.Data.Common.QueryCache { using System; using System.Collections.Generic; using System.Text; ////// represents an abstract cache key /// internal abstract class QueryCacheKey { #region Constants protected const int EstimatedParameterStringSize = 20; #endregion #region Fields ////// entry hit counter /// private uint _hitCount; ////// aging index /// private int _agingIndex; ////// default string comparison kind - Ordinal /// protected static StringComparison _stringComparison = StringComparison.Ordinal; #endregion #region Constructor protected QueryCacheKey() { _hitCount = 1; } #endregion #region Abstract Methods ////// Determines whether two instances of QueryCacheContext are equal. /// Equality is value based. /// /// ///public abstract override bool Equals( object obj ); /// /// Returns QueryCacheContext instance HashCode /// ///public abstract override int GetHashCode(); #endregion #region Internal API /// /// Cache entry hit count /// internal uint HitCount { get { return _hitCount; } set { _hitCount = value; } } ////// Gets/Sets Aging index for cache entry /// internal int AgingIndex { get { return _agingIndex; } set { _agingIndex = value; } } ////// Updates hit count /// internal void UpdateHit() { if (uint.MaxValue != _hitCount) { unchecked { _hitCount++; } } } ////// default string comparer /// /// /// ///protected virtual bool Equals( string s, string t ) { return String.Equals(s, t, _stringComparison); } #endregion } } // 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
- ListMarkerLine.cs
- UniqueEventHelper.cs
- ToolboxItemAttribute.cs
- CompositionAdorner.cs
- ToReply.cs
- AppDomainUnloadedException.cs
- StaticTextPointer.cs
- SafePEFileHandle.cs
- AbstractSvcMapFileLoader.cs
- BindingExpressionBase.cs
- AssociatedControlConverter.cs
- ParameterToken.cs
- DataSet.cs
- DataServiceExpressionVisitor.cs
- XmlSchemaAttributeGroup.cs
- DataRowExtensions.cs
- ListBoxAutomationPeer.cs
- StrokeNodeData.cs
- SvcMapFile.cs
- SingleObjectCollection.cs
- RenderDataDrawingContext.cs
- FormViewInsertEventArgs.cs
- ExtendedPropertyCollection.cs
- AudioLevelUpdatedEventArgs.cs
- ApplicationCommands.cs
- WorkflowApplicationException.cs
- PublisherIdentityPermission.cs
- StringSource.cs
- ProcessModelSection.cs
- WebContentFormatHelper.cs
- SortedList.cs
- DocobjHost.cs
- Mouse.cs
- SqlProcedureAttribute.cs
- LoginCancelEventArgs.cs
- BinaryFormatterWriter.cs
- OutputCacheSection.cs
- entitydatasourceentitysetnameconverter.cs
- Model3DGroup.cs
- IncomingWebResponseContext.cs
- XmlSchemaNotation.cs
- Trustee.cs
- DataGridViewCellMouseEventArgs.cs
- securestring.cs
- ToolbarAUtomationPeer.cs
- Crypto.cs
- SystemIPGlobalProperties.cs
- DetailsViewModeEventArgs.cs
- GeneralTransform3DCollection.cs
- DataBinding.cs
- ReflectionPermission.cs
- SelectionEditingBehavior.cs
- MgmtResManager.cs
- ItemsPanelTemplate.cs
- Exceptions.cs
- PageTrueTypeFont.cs
- PostBackTrigger.cs
- ClientConfigPaths.cs
- PrivilegeNotHeldException.cs
- WebChannelFactory.cs
- ConnectionsZone.cs
- DependencyPropertyKey.cs
- MenuStrip.cs
- PeerName.cs
- UserMapPath.cs
- ToolStripTextBox.cs
- ListCollectionView.cs
- LeafCellTreeNode.cs
- NullableDecimalAverageAggregationOperator.cs
- StorageComplexTypeMapping.cs
- UnmanagedMemoryStream.cs
- BaseCollection.cs
- EventRouteFactory.cs
- OleServicesContext.cs
- ModuleBuilder.cs
- AlternateView.cs
- dataobject.cs
- TrackBar.cs
- ConvertersCollection.cs
- StyleBamlTreeBuilder.cs
- DataGridItemEventArgs.cs
- DependencyObjectType.cs
- FileIOPermission.cs
- Shape.cs
- HtmlWindowCollection.cs
- StringAttributeCollection.cs
- RequestCacheManager.cs
- Int64AnimationBase.cs
- XsltInput.cs
- WebPartHelpVerb.cs
- WindowInteropHelper.cs
- WebPartZoneAutoFormat.cs
- ScriptRegistrationManager.cs
- RadialGradientBrush.cs
- PropertyInformation.cs
- AnnotationMap.cs
- TypeToken.cs
- HandlerFactoryCache.cs
- OleDbPropertySetGuid.cs
- ExpandSegment.cs