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
- IsolatedStoragePermission.cs
- FormsAuthenticationConfiguration.cs
- HelpProvider.cs
- mongolianshape.cs
- DataGridrowEditEndingEventArgs.cs
- EntityContainerRelationshipSet.cs
- RowToParametersTransformer.cs
- _AutoWebProxyScriptWrapper.cs
- WindowsContainer.cs
- StringExpressionSet.cs
- DetailsViewDeletedEventArgs.cs
- TdsParameterSetter.cs
- TransportReplyChannelAcceptor.cs
- TaskFactory.cs
- FilteredAttributeCollection.cs
- WebConfigurationFileMap.cs
- RouteValueExpressionBuilder.cs
- SqlTransaction.cs
- OracleEncoding.cs
- DropTarget.cs
- GridViewCellAutomationPeer.cs
- MethodRental.cs
- DefaultEventAttribute.cs
- SimpleApplicationHost.cs
- TypeNameParser.cs
- Int16Storage.cs
- HwndHostAutomationPeer.cs
- LayoutEditorPart.cs
- EncodingNLS.cs
- ObjRef.cs
- XslVisitor.cs
- Assign.cs
- DbProviderFactories.cs
- InputEventArgs.cs
- ButtonField.cs
- ImageSourceConverter.cs
- ExclusiveTcpListener.cs
- QueryCacheKey.cs
- SmiEventSink_Default.cs
- XmlSchema.cs
- HostedImpersonationContext.cs
- BaseValidatorDesigner.cs
- _KerberosClient.cs
- UdpDiscoveryEndpointProvider.cs
- ProcessHostConfigUtils.cs
- UnionCqlBlock.cs
- StateItem.cs
- WebPartConnectionsCancelEventArgs.cs
- ClientScriptManagerWrapper.cs
- TextPattern.cs
- BaseDataBoundControl.cs
- InkCanvasFeedbackAdorner.cs
- FunctionNode.cs
- SiteMapDataSourceDesigner.cs
- DataGridViewToolTip.cs
- InternalConfigSettingsFactory.cs
- TextServicesPropertyRanges.cs
- HashAlgorithm.cs
- NameGenerator.cs
- SourceChangedEventArgs.cs
- WeakRefEnumerator.cs
- BuildResult.cs
- PropertyInfo.cs
- SpellerStatusTable.cs
- InternalException.cs
- PartDesigner.cs
- EFTableProvider.cs
- QuaternionRotation3D.cs
- Rectangle.cs
- ModelFunctionTypeElement.cs
- ImpersonationContext.cs
- ContextMarshalException.cs
- SchemaImporterExtensionElementCollection.cs
- UrlPath.cs
- StateItem.cs
- Trace.cs
- TaskExtensions.cs
- input.cs
- PeerNameResolver.cs
- DataGridItem.cs
- smtppermission.cs
- SynchronizedInputProviderWrapper.cs
- ColumnResizeUndoUnit.cs
- NativeMethodsOther.cs
- PolicyLevel.cs
- FlowLayout.cs
- ManagedWndProcTracker.cs
- ServerIdentity.cs
- QueueProcessor.cs
- InternalSafeNativeMethods.cs
- TreeIterators.cs
- __Filters.cs
- WorkflowRuntimeSection.cs
- DelegatedStream.cs
- ParallelDesigner.cs
- TriState.cs
- ResourceSet.cs
- PagedDataSource.cs
- HtmlWindowCollection.cs
- ReceiveSecurityHeaderEntry.cs