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
- QilReplaceVisitor.cs
- ActivityDesigner.cs
- COM2ExtendedUITypeEditor.cs
- GifBitmapDecoder.cs
- RadioButtonList.cs
- BufferedStream.cs
- XmlBinaryReaderSession.cs
- SByte.cs
- _ProxyChain.cs
- StorageTypeMapping.cs
- DirectionalAction.cs
- ListViewItemMouseHoverEvent.cs
- MethodToken.cs
- precedingsibling.cs
- CollectionChangedEventManager.cs
- WebPartConnectionsEventArgs.cs
- UniqueEventHelper.cs
- LongValidator.cs
- SourceFileBuildProvider.cs
- CompiledQueryCacheKey.cs
- FileRegion.cs
- SvcFileManager.cs
- OverflowException.cs
- ReverseInheritProperty.cs
- Site.cs
- AttributeInfo.cs
- IsolatedStorageFileStream.cs
- OutputCacheProfileCollection.cs
- WindowsRegion.cs
- UserControl.cs
- SafeEventLogWriteHandle.cs
- DynamicActivityProperty.cs
- GeneralTransform3DTo2D.cs
- RijndaelManagedTransform.cs
- CodeObject.cs
- ResizingMessageFilter.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- CompiledAction.cs
- BindingCompleteEventArgs.cs
- HtmlTableRowCollection.cs
- DataListCommandEventArgs.cs
- EntityTypeEmitter.cs
- ComponentSerializationService.cs
- CryptographicAttribute.cs
- NotificationContext.cs
- TextElementEnumerator.cs
- TagNameToTypeMapper.cs
- Timer.cs
- ArrayHelper.cs
- SamlAuthenticationClaimResource.cs
- SelectedPathEditor.cs
- SecurityRuntime.cs
- RegularExpressionValidator.cs
- StructuralType.cs
- NullableDecimalSumAggregationOperator.cs
- StringReader.cs
- ServiceOperationInvoker.cs
- TemplatedWizardStep.cs
- DBSqlParser.cs
- login.cs
- HitTestParameters3D.cs
- Maps.cs
- ReturnEventArgs.cs
- TraceXPathNavigator.cs
- GeometryModel3D.cs
- XmlEntity.cs
- CodeCompileUnit.cs
- ColumnReorderedEventArgs.cs
- BulletDecorator.cs
- TableItemPatternIdentifiers.cs
- AssemblyHash.cs
- X509ThumbprintKeyIdentifierClause.cs
- DesignOnlyAttribute.cs
- CommandField.cs
- PathFigureCollection.cs
- DataGridComboBoxColumn.cs
- BoolExpressionVisitors.cs
- HttpCookie.cs
- SafeNativeMethods.cs
- Set.cs
- filewebresponse.cs
- ActivationService.cs
- XmlExtensionFunction.cs
- ToolBarPanel.cs
- Bitmap.cs
- WebBrowser.cs
- PocoEntityKeyStrategy.cs
- GridViewColumnHeaderAutomationPeer.cs
- TabItemWrapperAutomationPeer.cs
- MetadataPropertyAttribute.cs
- SecurityCredentialsManager.cs
- EnumUnknown.cs
- NumberFunctions.cs
- AdornerPresentationContext.cs
- SqlDataSourceSelectingEventArgs.cs
- AddingNewEventArgs.cs
- SqlInternalConnectionTds.cs
- Stroke2.cs
- DictionaryEditChange.cs
- ToggleProviderWrapper.cs