Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Common / QueryCache / CompiledQueryCacheKey.cs / 1305376 / CompiledQueryCacheKey.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- 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 [....] // @backupOwner [....] //----------------------------------------------------------------------------- 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
- SelectedDatesCollection.cs
- ConvertEvent.cs
- DataGridViewCellMouseEventArgs.cs
- DeflateInput.cs
- UInt16.cs
- UserControlParser.cs
- ValidatorCollection.cs
- CoordinationService.cs
- ContentPlaceHolder.cs
- DirectionalAction.cs
- Pool.cs
- FigureParaClient.cs
- Panel.cs
- TagPrefixInfo.cs
- HttpCapabilitiesBase.cs
- FixedDocumentPaginator.cs
- DataSourceXmlSubItemAttribute.cs
- sqlpipe.cs
- SqlNodeTypeOperators.cs
- ParallelTimeline.cs
- ObjectReaderCompiler.cs
- XmlDataLoader.cs
- XamlBuildTaskServices.cs
- LazyTextWriterCreator.cs
- DbConnectionPoolGroupProviderInfo.cs
- PropertyFilter.cs
- EventLogPermissionEntryCollection.cs
- Scene3D.cs
- Subtree.cs
- DownloadProgressEventArgs.cs
- ItemCheckedEvent.cs
- ACE.cs
- HatchBrush.cs
- infer.cs
- MimeXmlReflector.cs
- EventProviderTraceListener.cs
- WindowPattern.cs
- ArraySortHelper.cs
- XNodeNavigator.cs
- TableLayoutColumnStyleCollection.cs
- DateTimePicker.cs
- _TLSstream.cs
- XmlSchemaAttributeGroup.cs
- TailPinnedEventArgs.cs
- Brush.cs
- FileSystemInfo.cs
- XmlSchema.cs
- RewritingSimplifier.cs
- SimpleWorkerRequest.cs
- BufferedWebEventProvider.cs
- SQLByteStorage.cs
- TableLayoutCellPaintEventArgs.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- CheckBoxRenderer.cs
- DefaultAssemblyResolver.cs
- Point4D.cs
- ChannelCacheDefaults.cs
- Style.cs
- PriorityItem.cs
- AppManager.cs
- FacetDescriptionElement.cs
- DragCompletedEventArgs.cs
- ToolStripItemCollection.cs
- XsltSettings.cs
- EntityDataSourceState.cs
- Renderer.cs
- GroupPartitionExpr.cs
- ConfigurationManagerInternalFactory.cs
- xmlsaver.cs
- X509UI.cs
- DependencyPropertyKey.cs
- AutoResetEvent.cs
- ConfigurationLocation.cs
- HtmlLinkAdapter.cs
- TextSelectionProcessor.cs
- TextServicesDisplayAttribute.cs
- ContentType.cs
- LoginCancelEventArgs.cs
- RowsCopiedEventArgs.cs
- SecurityTraceRecordHelper.cs
- TextServicesContext.cs
- FloaterBaseParagraph.cs
- SessionIDManager.cs
- Int64Converter.cs
- CodeArgumentReferenceExpression.cs
- ProxyGenerator.cs
- MiniLockedBorderGlyph.cs
- Timer.cs
- InternalPermissions.cs
- SourceLocationProvider.cs
- DetailsViewCommandEventArgs.cs
- TextViewSelectionProcessor.cs
- GenericArgumentsUpdater.cs
- DocumentAutomationPeer.cs
- FlatButtonAppearance.cs
- ParallelActivityDesigner.cs
- Base64Stream.cs
- XmlHierarchyData.cs
- ImageButton.cs
- SizeConverter.cs