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
- WindowCollection.cs
- HierarchicalDataBoundControlAdapter.cs
- AnonymousIdentificationModule.cs
- Package.cs
- TextUtf8RawTextWriter.cs
- DocumentPageTextView.cs
- BlurEffect.cs
- PartialTrustVisibleAssemblyCollection.cs
- SourceExpressionException.cs
- ControlLocalizer.cs
- HttpEncoderUtility.cs
- EnumMemberAttribute.cs
- ColorPalette.cs
- AsyncOperationManager.cs
- TimeZone.cs
- WindowPattern.cs
- EncryptedReference.cs
- DSASignatureDeformatter.cs
- StaticFileHandler.cs
- FlowDocumentFormatter.cs
- SchemaEntity.cs
- VisualBasicSettingsHandler.cs
- JournalEntryListConverter.cs
- ManagementObjectCollection.cs
- DirectoryObjectSecurity.cs
- ServerIdentity.cs
- Int64Storage.cs
- PieceNameHelper.cs
- CapacityStreamGeometryContext.cs
- Trace.cs
- x509store.cs
- NonParentingControl.cs
- ObjectDataSourceDisposingEventArgs.cs
- RunWorkerCompletedEventArgs.cs
- HwndProxyElementProvider.cs
- SmiContextFactory.cs
- ServiceObjectContainer.cs
- HttpException.cs
- XappLauncher.cs
- XhtmlTextWriter.cs
- Activator.cs
- PipelineModuleStepContainer.cs
- CommandLineParser.cs
- MainMenu.cs
- XmlFormatExtensionPrefixAttribute.cs
- Point3DAnimationUsingKeyFrames.cs
- QueryBranchOp.cs
- ContentElementAutomationPeer.cs
- CodeTypeReferenceExpression.cs
- BStrWrapper.cs
- TargetInvocationException.cs
- Merger.cs
- XmlWhitespace.cs
- UmAlQuraCalendar.cs
- WinInet.cs
- CompressEmulationStream.cs
- MultiSelectRootGridEntry.cs
- TransportConfigurationTypeElement.cs
- SQLCharsStorage.cs
- TextEditorSelection.cs
- DefaultEventAttribute.cs
- InputQueueChannelAcceptor.cs
- SmtpReplyReaderFactory.cs
- XmlElement.cs
- SessionStateItemCollection.cs
- _KerberosClient.cs
- IgnoreSection.cs
- DataPagerFieldCommandEventArgs.cs
- EditorPartChrome.cs
- ThreadSafeList.cs
- TailCallAnalyzer.cs
- ViewGenerator.cs
- ToolStripSeparator.cs
- HtmlContainerControl.cs
- XsltLibrary.cs
- BitmapEncoder.cs
- FileAccessException.cs
- DictionarySectionHandler.cs
- MessageFault.cs
- SqlConnectionManager.cs
- TemplateControlCodeDomTreeGenerator.cs
- TextParaClient.cs
- TextEditorDragDrop.cs
- MeasurementDCInfo.cs
- PropertyPushdownHelper.cs
- CommonXSendMessage.cs
- PersistChildrenAttribute.cs
- BindingUtils.cs
- ConditionalAttribute.cs
- Claim.cs
- XslCompiledTransform.cs
- InvokeHandlers.cs
- WebPartHeaderCloseVerb.cs
- MessageQueueTransaction.cs
- SchemaNames.cs
- ButtonBase.cs
- Rect3DConverter.cs
- UIElement.cs
- BrowserInteropHelper.cs
- PreloadedPackages.cs