Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- TextComposition.cs
- OdbcConnectionOpen.cs
- PaintEvent.cs
- DCSafeHandle.cs
- AsyncStreamReader.cs
- ClientRoleProvider.cs
- CodeDefaultValueExpression.cs
- PostBackOptions.cs
- SystemInformation.cs
- DataGridViewTopRowAccessibleObject.cs
- XmlWrappingReader.cs
- TabItemWrapperAutomationPeer.cs
- ZipPackage.cs
- TypeElementCollection.cs
- _Semaphore.cs
- ParserOptions.cs
- DataControlCommands.cs
- _BaseOverlappedAsyncResult.cs
- CommandManager.cs
- AttributeData.cs
- As.cs
- DataGridViewColumnConverter.cs
- XMLSchema.cs
- FileInfo.cs
- TypeConverters.cs
- ResourceReader.cs
- NonVisualControlAttribute.cs
- OuterGlowBitmapEffect.cs
- TogglePattern.cs
- GPRECT.cs
- ConsoleKeyInfo.cs
- COM2Enum.cs
- Light.cs
- PropertyChange.cs
- PeerContact.cs
- SiteMapPathDesigner.cs
- LineUtil.cs
- StyleTypedPropertyAttribute.cs
- XmlLanguageConverter.cs
- Package.cs
- DropTarget.cs
- EventProviderWriter.cs
- RightsManagementEncryptionTransform.cs
- HtmlWindow.cs
- HierarchicalDataSourceControl.cs
- UIElementIsland.cs
- TabControlAutomationPeer.cs
- TypeConverterMarkupExtension.cs
- RegisteredHiddenField.cs
- ParserStreamGeometryContext.cs
- OrCondition.cs
- ScriptReference.cs
- OdbcParameterCollection.cs
- DataGridRowHeaderAutomationPeer.cs
- MediaTimeline.cs
- FormClosedEvent.cs
- XsltLoader.cs
- UpdateEventArgs.cs
- TransformerInfoCollection.cs
- AlignmentYValidation.cs
- LineServicesCallbacks.cs
- WmlTextBoxAdapter.cs
- FrameSecurityDescriptor.cs
- CalculatedColumn.cs
- FigureParagraph.cs
- BitConverter.cs
- RoamingStoreFileUtility.cs
- EntryWrittenEventArgs.cs
- InvokeBase.cs
- DeclaredTypeValidatorAttribute.cs
- SqlMethodCallConverter.cs
- DataChangedEventManager.cs
- JapaneseLunisolarCalendar.cs
- LinkedList.cs
- NameTable.cs
- AssemblyResourceLoader.cs
- cache.cs
- ByteKeyFrameCollection.cs
- HMACSHA256.cs
- HMACSHA512.cs
- ProxyHelper.cs
- Lease.cs
- CodeBinaryOperatorExpression.cs
- AttachmentCollection.cs
- HttpContextWrapper.cs
- TdsParserStaticMethods.cs
- RelationshipFixer.cs
- HostingPreferredMapPath.cs
- ToolStripScrollButton.cs
- ConnectionManagementElement.cs
- KeyPullup.cs
- BasicDesignerLoader.cs
- UrlPath.cs
- MimeTypePropertyAttribute.cs
- RegularExpressionValidator.cs
- IdentityElement.cs
- RemotingService.cs
- RegexNode.cs
- Peer.cs
- TabControl.cs