Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- XmlTextReaderImpl.cs
- CodeVariableReferenceExpression.cs
- TransactionFlowElement.cs
- XhtmlTextWriter.cs
- GridViewAutomationPeer.cs
- FontStretchConverter.cs
- ImpersonationOption.cs
- ManagementScope.cs
- MorphHelpers.cs
- PageThemeCodeDomTreeGenerator.cs
- KeyGestureValueSerializer.cs
- XD.cs
- DetailsViewInsertedEventArgs.cs
- PriorityBindingExpression.cs
- ViewKeyConstraint.cs
- DrawingContextWalker.cs
- LifetimeServices.cs
- DataServiceEntityAttribute.cs
- DataGridViewImageColumn.cs
- DrawingDrawingContext.cs
- QueueProcessor.cs
- XmlNamespaceDeclarationsAttribute.cs
- StyleBamlRecordReader.cs
- Comparer.cs
- PropertyValueUIItem.cs
- DeclarationUpdate.cs
- FileUtil.cs
- Size3DConverter.cs
- MouseGesture.cs
- IsolatedStoragePermission.cs
- Stream.cs
- XamlTreeBuilderBamlRecordWriter.cs
- CTreeGenerator.cs
- SQLDoubleStorage.cs
- ProtectedConfigurationSection.cs
- CacheDependency.cs
- MemoryStream.cs
- StoragePropertyMapping.cs
- ProtocolsConfigurationEntry.cs
- WebPartMovingEventArgs.cs
- XmlSchemaRedefine.cs
- SecurityHelper.cs
- SHA384Managed.cs
- ErasingStroke.cs
- RoutingSection.cs
- SingleSelectRootGridEntry.cs
- ContainerVisual.cs
- SchemaCreator.cs
- MethodAccessException.cs
- SafeEventLogWriteHandle.cs
- ToggleButtonAutomationPeer.cs
- PageBuildProvider.cs
- CodeTypeOfExpression.cs
- TypeLoadException.cs
- Version.cs
- RuntimeCompatibilityAttribute.cs
- DeleteHelper.cs
- DbMetaDataFactory.cs
- ChannelSinkStacks.cs
- X509ChainElement.cs
- MetaColumn.cs
- InkCanvasAutomationPeer.cs
- DesignerHost.cs
- DataListItemEventArgs.cs
- QilXmlWriter.cs
- ClientUtils.cs
- BindingNavigator.cs
- WeakReferenceList.cs
- DesignBindingEditor.cs
- DoWorkEventArgs.cs
- BitmapFrame.cs
- DataGridViewRowsAddedEventArgs.cs
- _AcceptOverlappedAsyncResult.cs
- Schedule.cs
- TemplatePartAttribute.cs
- OleDbException.cs
- Journal.cs
- Tablet.cs
- CounterCreationData.cs
- InvokePattern.cs
- Vector3DKeyFrameCollection.cs
- SoapIgnoreAttribute.cs
- InkCanvasSelectionAdorner.cs
- DataGridViewRowsRemovedEventArgs.cs
- EncryptedKey.cs
- CalendarDataBindingHandler.cs
- CounterCreationData.cs
- ServiceActivationException.cs
- updateconfighost.cs
- QuerySettings.cs
- Polygon.cs
- DataGridViewColumnEventArgs.cs
- SafeHandle.cs
- ServiceEndpointCollection.cs
- DataGridViewColumnEventArgs.cs
- IdentityReference.cs
- DynamicRenderer.cs
- SerTrace.cs
- XamlFilter.cs
- _ConnectOverlappedAsyncResult.cs