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
- BigInt.cs
- DocumentGrid.cs
- SequentialWorkflowHeaderFooter.cs
- Qualifier.cs
- WebPartAuthorizationEventArgs.cs
- NullRuntimeConfig.cs
- HasCopySemanticsAttribute.cs
- SoundPlayerAction.cs
- PromptEventArgs.cs
- XmlUtil.cs
- SystemGatewayIPAddressInformation.cs
- SingleConverter.cs
- XmlDesigner.cs
- PathFigureCollection.cs
- ToolStripGrip.cs
- ErrorWrapper.cs
- IndentTextWriter.cs
- Descriptor.cs
- SqlCommandSet.cs
- GraphicsPathIterator.cs
- QueryTaskGroupState.cs
- TextElementCollection.cs
- Image.cs
- FirstMatchCodeGroup.cs
- IsolatedStorageFile.cs
- SelectionListComponentEditor.cs
- WindowHideOrCloseTracker.cs
- GridViewRowPresenterBase.cs
- WebPartDisplayModeCancelEventArgs.cs
- ProgressiveCrcCalculatingStream.cs
- Size.cs
- MasterPageCodeDomTreeGenerator.cs
- DataSourceSelectArguments.cs
- FragmentQueryKB.cs
- ValidationErrorEventArgs.cs
- TreeNodeCollection.cs
- DeliveryStrategy.cs
- HttpListenerContext.cs
- DropDownHolder.cs
- PaintValueEventArgs.cs
- TextEditor.cs
- DashStyle.cs
- TreeBuilder.cs
- HtmlTableCellCollection.cs
- PropertyMetadata.cs
- DeviceSpecificChoice.cs
- webproxy.cs
- Conditional.cs
- TypedServiceOperationListItem.cs
- BuildDependencySet.cs
- ElementInit.cs
- DataTemplateSelector.cs
- ShutDownListener.cs
- WebBrowser.cs
- CodePageEncoding.cs
- C14NUtil.cs
- RegexMatchCollection.cs
- ProcessInputEventArgs.cs
- CFStream.cs
- XmlChoiceIdentifierAttribute.cs
- GPPOINT.cs
- TextEditorMouse.cs
- IDReferencePropertyAttribute.cs
- ObjectListGeneralPage.cs
- CryptoKeySecurity.cs
- XmlSchemaCollection.cs
- HiddenField.cs
- cryptoapiTransform.cs
- BaseTemplateBuildProvider.cs
- DefinitionProperties.cs
- LoginCancelEventArgs.cs
- Substitution.cs
- ForeignKeyFactory.cs
- MyContact.cs
- DrawingContextDrawingContextWalker.cs
- AuthenticationModulesSection.cs
- NullReferenceException.cs
- PenContext.cs
- ProxyHwnd.cs
- ToolStripTextBox.cs
- ScriptingSectionGroup.cs
- StructuredTypeEmitter.cs
- NetStream.cs
- LZCodec.cs
- ApplicationTrust.cs
- RequestSecurityTokenResponse.cs
- SqlParameterizer.cs
- BufferCache.cs
- PassportAuthenticationModule.cs
- Site.cs
- ReflectionHelper.cs
- ImageSourceConverter.cs
- ShapeTypeface.cs
- Internal.cs
- HyperlinkAutomationPeer.cs
- DatatypeImplementation.cs
- TemplateControlCodeDomTreeGenerator.cs
- LinqDataSource.cs
- mediaeventshelper.cs
- LabelAutomationPeer.cs