Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Common / QueryCache / CompiledQueryCacheKey.cs / 1 / CompiledQueryCacheKey.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....], [....] //----------------------------------------------------------------------------- namespace System.Data.Common.QueryCache { using System; using System.Diagnostics; internal sealed class CompiledQueryCacheKey : QueryCacheKey { private readonly Guid _cacheIdentity; internal CompiledQueryCacheKey(Guid cacheIdentity) { _cacheIdentity = cacheIdentity; } ////// Determines equality of this key with respect to /// ////// public override bool Equals(object compareTo) { Debug.Assert(compareTo != null, "Comparison key should not be null"); if (typeof(CompiledQueryCacheKey) != compareTo.GetType()) { return false; } return ((CompiledQueryCacheKey)compareTo)._cacheIdentity.Equals(this._cacheIdentity); } /// /// Returns the hashcode for this cache key /// ///public override int GetHashCode() { return _cacheIdentity.GetHashCode(); } /// /// Returns a string representation of the state of this cache key /// ////// A string representation that includes query text, parameter information, include path information /// and merge option information about this cache key. /// public override string ToString() { return _cacheIdentity.ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....], [....] //----------------------------------------------------------------------------- namespace System.Data.Common.QueryCache { using System; using System.Diagnostics; internal sealed class CompiledQueryCacheKey : QueryCacheKey { private readonly Guid _cacheIdentity; internal CompiledQueryCacheKey(Guid cacheIdentity) { _cacheIdentity = cacheIdentity; } ////// Determines equality of this key with respect to /// ////// public override bool Equals(object compareTo) { Debug.Assert(compareTo != null, "Comparison key should not be null"); if (typeof(CompiledQueryCacheKey) != compareTo.GetType()) { return false; } return ((CompiledQueryCacheKey)compareTo)._cacheIdentity.Equals(this._cacheIdentity); } /// /// Returns the hashcode for this cache key /// ///public override int GetHashCode() { return _cacheIdentity.GetHashCode(); } /// /// Returns a string representation of the state of this cache key /// ////// A string representation that includes query text, parameter information, include path information /// and merge option information about this cache key. /// public override string ToString() { return _cacheIdentity.ToString(); } } } // 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
- ConnectionPointCookie.cs
- Oid.cs
- TemplatedWizardStep.cs
- xmlglyphRunInfo.cs
- PageBreakRecord.cs
- BaseDataList.cs
- ReadOnlyDictionary.cs
- ContentPropertyAttribute.cs
- nulltextcontainer.cs
- DuplexChannelFactory.cs
- InheritedPropertyChangedEventArgs.cs
- XmlSchemaElement.cs
- LoginCancelEventArgs.cs
- DebugView.cs
- Bidi.cs
- SchemaTableOptionalColumn.cs
- WCFBuildProvider.cs
- PersistChildrenAttribute.cs
- ContextDataSource.cs
- OperandQuery.cs
- DataFormats.cs
- TraceEventCache.cs
- PtsHost.cs
- _AcceptOverlappedAsyncResult.cs
- BezierSegment.cs
- odbcmetadatacolumnnames.cs
- RetrieveVirtualItemEventArgs.cs
- NavigationProgressEventArgs.cs
- FontNamesConverter.cs
- UpdateTranslator.cs
- Rss20FeedFormatter.cs
- GetPageCompletedEventArgs.cs
- OptimizerPatterns.cs
- ByeMessageCD1.cs
- NullExtension.cs
- TextElementCollectionHelper.cs
- Tokenizer.cs
- DispatcherObject.cs
- WSHttpBindingCollectionElement.cs
- BatchServiceHost.cs
- ProgressBarHighlightConverter.cs
- IPAddress.cs
- ResourceProperty.cs
- ActivityExecutorSurrogate.cs
- AddInServer.cs
- ExecutionContext.cs
- LinearQuaternionKeyFrame.cs
- ProfileParameter.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- DataObjectFieldAttribute.cs
- DecoratedNameAttribute.cs
- UniqueID.cs
- WebConfigurationFileMap.cs
- SelectionItemProviderWrapper.cs
- DataServiceQuery.cs
- WeakReferenceKey.cs
- ToolStripPanel.cs
- TransformCollection.cs
- DependencyPropertyConverter.cs
- GiveFeedbackEventArgs.cs
- XPathDocumentIterator.cs
- AncillaryOps.cs
- CodeConstructor.cs
- SymDocumentType.cs
- HeaderFilter.cs
- BinaryMethodMessage.cs
- Model3DGroup.cs
- DSGeneratorProblem.cs
- AnnotationService.cs
- SchemaTypeEmitter.cs
- InlineUIContainer.cs
- HyperLink.cs
- SchemaNames.cs
- AliasExpr.cs
- DataSysAttribute.cs
- TextFindEngine.cs
- Application.cs
- ArrayElementGridEntry.cs
- BufferedReadStream.cs
- HwndAppCommandInputProvider.cs
- BindStream.cs
- XmlDomTextWriter.cs
- InputBuffer.cs
- BooleanFacetDescriptionElement.cs
- BlurEffect.cs
- OperationAbortedException.cs
- ToolbarAUtomationPeer.cs
- CLRBindingWorker.cs
- SimpleWorkerRequest.cs
- CommandLineParser.cs
- MemoryFailPoint.cs
- SymmetricKeyWrap.cs
- CodeObjectCreateExpression.cs
- Underline.cs
- WindowsToolbarAsMenu.cs
- QilTernary.cs
- BooleanAnimationUsingKeyFrames.cs
- ContentPlaceHolderDesigner.cs
- SecuritySessionServerSettings.cs
- AutomationPropertyInfo.cs