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
- Splitter.cs
- HGlobalSafeHandle.cs
- ToolStripControlHost.cs
- CodeSnippetCompileUnit.cs
- DataGridColumn.cs
- CodeTypeOfExpression.cs
- HtmlEmptyTagControlBuilder.cs
- PrefixQName.cs
- LockedBorderGlyph.cs
- ObjectListGeneralPage.cs
- SafeNativeMethodsCLR.cs
- SqlCommandBuilder.cs
- RouteParametersHelper.cs
- StylusOverProperty.cs
- SQLResource.cs
- DivideByZeroException.cs
- CryptoConfig.cs
- HostedHttpContext.cs
- TextMarkerSource.cs
- MatrixTransform3D.cs
- ViewLoader.cs
- QueueProcessor.cs
- PointConverter.cs
- CompiledELinqQueryState.cs
- CodeConditionStatement.cs
- SystemIPGlobalStatistics.cs
- Clause.cs
- DrawingAttributesDefaultValueFactory.cs
- XmlTypeAttribute.cs
- EntityDataSourceWrapperCollection.cs
- SQLUtility.cs
- UserControlFileEditor.cs
- UniqueEventHelper.cs
- TransformerConfigurationWizardBase.cs
- ContentTextAutomationPeer.cs
- COM2TypeInfoProcessor.cs
- DataServiceConfiguration.cs
- TemplatedWizardStep.cs
- NumberFormatter.cs
- MailBnfHelper.cs
- ProviderIncompatibleException.cs
- WindowsScrollBar.cs
- LoadRetryHandler.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- Action.cs
- EmptyEnumerable.cs
- DataKey.cs
- ActivityDelegate.cs
- OracleConnectionString.cs
- sortedlist.cs
- SmtpNegotiateAuthenticationModule.cs
- LineBreakRecord.cs
- MasterPageCodeDomTreeGenerator.cs
- CheckBox.cs
- ChangePassword.cs
- XamlStyleSerializer.cs
- ResourceManager.cs
- CaseStatement.cs
- PresentationAppDomainManager.cs
- SchemaTableOptionalColumn.cs
- ButtonStandardAdapter.cs
- ConnectionManagementElement.cs
- GPPOINT.cs
- RectAnimationUsingKeyFrames.cs
- ProjectionPruner.cs
- LineServicesCallbacks.cs
- WmpBitmapDecoder.cs
- XmlSerializationWriter.cs
- TableLayoutColumnStyleCollection.cs
- WmlValidatorAdapter.cs
- _NTAuthentication.cs
- Timeline.cs
- Speller.cs
- GregorianCalendarHelper.cs
- BitVector32.cs
- CodeArrayCreateExpression.cs
- CacheVirtualItemsEvent.cs
- PackUriHelper.cs
- Control.cs
- SqlDataSourceStatusEventArgs.cs
- ListViewSelectEventArgs.cs
- IpcClientManager.cs
- UnsafeNativeMethods.cs
- InkPresenterAutomationPeer.cs
- DataGridViewImageCell.cs
- Panel.cs
- LayoutSettings.cs
- DynamicActivity.cs
- CollectionView.cs
- SoapTypeAttribute.cs
- TextDpi.cs
- Configuration.cs
- RepeaterItemEventArgs.cs
- RootProfilePropertySettingsCollection.cs
- AutomationPatternInfo.cs
- NameValueSectionHandler.cs
- WorkflowInstance.cs
- HtmlElementCollection.cs
- ColumnResizeAdorner.cs
- OleDbStruct.cs