Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- MDIWindowDialog.cs
- BuildManagerHost.cs
- OleServicesContext.cs
- ToolStripButton.cs
- TimeZoneNotFoundException.cs
- ChameleonKey.cs
- CollaborationHelperFunctions.cs
- CustomValidator.cs
- XPathDocumentBuilder.cs
- sortedlist.cs
- QueryComponents.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- ControlCollection.cs
- OracleMonthSpan.cs
- BinaryReader.cs
- CodeTypeMemberCollection.cs
- PolicyStatement.cs
- Funcletizer.cs
- SafeHandles.cs
- PasswordBox.cs
- DbConnectionFactory.cs
- CodeExporter.cs
- DataControlFieldCollection.cs
- MetadataItemSerializer.cs
- RectAnimationBase.cs
- ErrorFormatter.cs
- Int32Rect.cs
- TextChangedEventArgs.cs
- SettingsContext.cs
- SmiMetaDataProperty.cs
- DrawListViewSubItemEventArgs.cs
- DataContractSet.cs
- _BufferOffsetSize.cs
- ToolStripLocationCancelEventArgs.cs
- WebServiceHandlerFactory.cs
- NativeMethods.cs
- NativeStructs.cs
- Transform3D.cs
- TextParaClient.cs
- PackagePart.cs
- DataKey.cs
- LazyInitializer.cs
- ProfilePropertyNameValidator.cs
- IssuanceLicense.cs
- PasswordRecovery.cs
- Single.cs
- System.Data_BID.cs
- DBConnectionString.cs
- LabelLiteral.cs
- DesignerDataTableBase.cs
- ComponentCollection.cs
- HttpCookie.cs
- RowVisual.cs
- DataGridViewDataConnection.cs
- FilteredDataSetHelper.cs
- DiscoveryClientProtocol.cs
- SqlBulkCopyColumnMappingCollection.cs
- BoundConstants.cs
- MenuItemBinding.cs
- ProcessingInstructionAction.cs
- Command.cs
- EventListenerClientSide.cs
- KeyValuePairs.cs
- Matrix.cs
- SqlDataSourceView.cs
- Number.cs
- PersistChildrenAttribute.cs
- MaskedTextBox.cs
- PathSegmentCollection.cs
- PeerTransportListenAddressConverter.cs
- XsdValidatingReader.cs
- PieceNameHelper.cs
- ControlParameter.cs
- PermissionRequestEvidence.cs
- HtmlDocument.cs
- SqlDependencyUtils.cs
- BamlBinaryReader.cs
- EllipticalNodeOperations.cs
- StringKeyFrameCollection.cs
- EmbeddedMailObjectsCollection.cs
- IdentityReference.cs
- NonSerializedAttribute.cs
- SolidColorBrush.cs
- DefaultValueConverter.cs
- UrlAuthFailedErrorFormatter.cs
- PageThemeBuildProvider.cs
- ProcessHostConfigUtils.cs
- ErrorStyle.cs
- OutOfMemoryException.cs
- AtomPub10ServiceDocumentFormatter.cs
- SqlGenericUtil.cs
- CngKeyCreationParameters.cs
- NamespaceMapping.cs
- RepeaterItemEventArgs.cs
- XamlBrushSerializer.cs
- ChtmlTextWriter.cs
- ArgIterator.cs
- EventManager.cs
- FlowDocumentPaginator.cs
- CriticalFinalizerObject.cs