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
- Brushes.cs
- Rotation3D.cs
- CombinedHttpChannel.cs
- XmlEncoding.cs
- StringPropertyBuilder.cs
- BitmapEffectInput.cs
- ErrorFormatterPage.cs
- RequestResizeEvent.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- ExtentCqlBlock.cs
- Convert.cs
- ShutDownListener.cs
- HyperLinkStyle.cs
- RequestTimeoutManager.cs
- MissingSatelliteAssemblyException.cs
- WebConfigurationFileMap.cs
- ServiceSecurityContext.cs
- ValidationEventArgs.cs
- PermissionAttributes.cs
- ToolStripDropDownClosingEventArgs.cs
- DebugView.cs
- UpdateManifestForBrowserApplication.cs
- HttpRawResponse.cs
- ObjectDataSourceEventArgs.cs
- MethodBody.cs
- CheckBox.cs
- PageBuildProvider.cs
- ModuleBuilderData.cs
- CodeAccessPermission.cs
- PerformanceCounterPermissionEntry.cs
- ConfigurationProperty.cs
- DiagnosticTraceRecords.cs
- smtppermission.cs
- Queue.cs
- UserValidatedEventArgs.cs
- Number.cs
- XmlSchemaNotation.cs
- SqlClientFactory.cs
- ToolboxItemLoader.cs
- RegexParser.cs
- XmlDownloadManager.cs
- ReflectionPermission.cs
- FrameAutomationPeer.cs
- MetabaseServerConfig.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- Interfaces.cs
- UIElementAutomationPeer.cs
- Clipboard.cs
- Intellisense.cs
- XmlAttributes.cs
- LinkedResourceCollection.cs
- InternalBase.cs
- CompressStream.cs
- DllNotFoundException.cs
- EventLogInternal.cs
- TableRowCollection.cs
- StateFinalizationActivity.cs
- TextRunCache.cs
- ComponentCommands.cs
- Composition.cs
- TextDecorationCollectionConverter.cs
- ResumeStoryboard.cs
- TitleStyle.cs
- SelectionEditor.cs
- ScriptingProfileServiceSection.cs
- dataobject.cs
- ScalarOps.cs
- PrintDialog.cs
- RemoveStoryboard.cs
- SrgsItemList.cs
- IPHostEntry.cs
- RemotingException.cs
- DesignerVerbCollection.cs
- SchemaTypeEmitter.cs
- CodeTypeParameterCollection.cs
- HtmlFormParameterReader.cs
- DateTimeConverter2.cs
- Pens.cs
- IdentityNotMappedException.cs
- DetailsViewDeleteEventArgs.cs
- BypassElementCollection.cs
- MtomMessageEncoder.cs
- XmlDataProvider.cs
- SimplePropertyEntry.cs
- SchemaRegistration.cs
- ReturnEventArgs.cs
- UnauthorizedWebPart.cs
- ComponentResourceKeyConverter.cs
- recordstatefactory.cs
- SqlHelper.cs
- SqlComparer.cs
- RawMouseInputReport.cs
- ChangesetResponse.cs
- XmlValidatingReaderImpl.cs
- WindowsTitleBar.cs
- RepeatBehaviorConverter.cs
- HtmlLink.cs
- TimeZone.cs
- PointAnimationUsingKeyFrames.cs
- IndicShape.cs