Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- DataGridViewAddColumnDialog.cs
- PointAnimationUsingKeyFrames.cs
- MetadataUtil.cs
- GlyphElement.cs
- TypeConstant.cs
- ColumnMap.cs
- TypeDescriptorFilterService.cs
- DataConnectionHelper.cs
- Marshal.cs
- ProjectionCamera.cs
- SqlInternalConnection.cs
- RegexWorker.cs
- localization.cs
- keycontainerpermission.cs
- Rectangle.cs
- DataView.cs
- ExpandSegmentCollection.cs
- Dynamic.cs
- AttributeQuery.cs
- DynamicDataRouteHandler.cs
- RealizedColumnsBlock.cs
- OleDbErrorCollection.cs
- VectorCollectionValueSerializer.cs
- XmlArrayItemAttribute.cs
- XmlElementAttributes.cs
- HostingEnvironment.cs
- Constants.cs
- PropertyIDSet.cs
- DbProviderConfigurationHandler.cs
- HtmlSelect.cs
- WhitespaceSignificantCollectionAttribute.cs
- ParseHttpDate.cs
- HttpHandlerActionCollection.cs
- _LazyAsyncResult.cs
- ReflectionUtil.cs
- EncoderParameter.cs
- TransactionManager.cs
- NativeMethods.cs
- CryptoApi.cs
- UrlMappingsSection.cs
- userdatakeys.cs
- StyleConverter.cs
- ResourceCategoryAttribute.cs
- DecoderFallbackWithFailureFlag.cs
- ProtectedConfigurationSection.cs
- RelationshipWrapper.cs
- PopupRoot.cs
- SudsCommon.cs
- PageCache.cs
- InternalControlCollection.cs
- UnsafeNativeMethods.cs
- ToolStripPanelCell.cs
- MultiSelectRootGridEntry.cs
- SecurityResources.cs
- BezierSegment.cs
- NameObjectCollectionBase.cs
- GradientStop.cs
- BaseDataBoundControlDesigner.cs
- QuaternionKeyFrameCollection.cs
- MeshGeometry3D.cs
- ConfigXmlAttribute.cs
- CodeAttributeArgumentCollection.cs
- PropertyIDSet.cs
- ServiceChannelManager.cs
- WebServiceClientProxyGenerator.cs
- SQLDouble.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- ConcatQueryOperator.cs
- NgenServicingAttributes.cs
- WebSysDescriptionAttribute.cs
- _OverlappedAsyncResult.cs
- SHA512Cng.cs
- DockProviderWrapper.cs
- RootBuilder.cs
- SqlCommandBuilder.cs
- ECDiffieHellmanCngPublicKey.cs
- XPathSelectionIterator.cs
- FrameworkElementFactory.cs
- Object.cs
- HwndStylusInputProvider.cs
- PasswordDeriveBytes.cs
- CardSpacePolicyElement.cs
- DataContractSerializerSection.cs
- GifBitmapEncoder.cs
- DesignerHelpers.cs
- ReferentialConstraintRoleElement.cs
- AsyncResult.cs
- WebPartHelpVerb.cs
- PasswordDeriveBytes.cs
- Matrix3DStack.cs
- EndpointDiscoveryMetadataCD1.cs
- UpdatePanelTriggerCollection.cs
- ListItemParagraph.cs
- CodeFieldReferenceExpression.cs
- RSACryptoServiceProvider.cs
- XPathNavigator.cs
- ToolboxBitmapAttribute.cs
- HttpCacheVaryByContentEncodings.cs
- XNameConverter.cs
- PresentationAppDomainManager.cs