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
- ZoneButton.cs
- DataTemplateSelector.cs
- OracleCommandBuilder.cs
- ObjectItemLoadingSessionData.cs
- ImportContext.cs
- InternalCache.cs
- TrustExchangeException.cs
- PermissionListSet.cs
- SvcMapFile.cs
- DropAnimation.xaml.cs
- StrokeNodeOperations2.cs
- XmlnsDefinitionAttribute.cs
- TypeResolvingOptions.cs
- SQLCharsStorage.cs
- HttpResponseInternalBase.cs
- RootCodeDomSerializer.cs
- StylusButtonEventArgs.cs
- RoutedPropertyChangedEventArgs.cs
- NavigationFailedEventArgs.cs
- ZoneButton.cs
- ParameterModifier.cs
- HostedElements.cs
- InitializationEventAttribute.cs
- LocalizedNameDescriptionPair.cs
- InlinedAggregationOperatorEnumerator.cs
- ScrollItemPattern.cs
- XsdBuilder.cs
- InfiniteIntConverter.cs
- SmiTypedGetterSetter.cs
- IsolationInterop.cs
- FieldTemplateUserControl.cs
- XmlSignatureManifest.cs
- SByteConverter.cs
- BridgeDataRecord.cs
- DbProviderSpecificTypePropertyAttribute.cs
- MessageEncodingBindingElementImporter.cs
- BevelBitmapEffect.cs
- StaticResourceExtension.cs
- securestring.cs
- XmlCharacterData.cs
- CompiledQuery.cs
- InvokePattern.cs
- DynamicPhysicalDiscoSearcher.cs
- XamlPointCollectionSerializer.cs
- ResponseBodyWriter.cs
- Function.cs
- UnsafeMethods.cs
- BinaryReader.cs
- ProcessManager.cs
- IncrementalHitTester.cs
- StorageSetMapping.cs
- Misc.cs
- ResourceIDHelper.cs
- WebDisplayNameAttribute.cs
- ReturnValue.cs
- GridViewDeletedEventArgs.cs
- SQLInt16Storage.cs
- PTManager.cs
- XamlPathDataSerializer.cs
- FilteredSchemaElementLookUpTable.cs
- DataGridViewIntLinkedList.cs
- FastEncoderWindow.cs
- Vector3DAnimation.cs
- EncoderReplacementFallback.cs
- UidManager.cs
- OutOfMemoryException.cs
- DataServiceConfiguration.cs
- CreateUserErrorEventArgs.cs
- SpellerStatusTable.cs
- SendKeys.cs
- InvalidCastException.cs
- MetadataPropertyvalue.cs
- NamespaceInfo.cs
- DataTransferEventArgs.cs
- Walker.cs
- CornerRadiusConverter.cs
- ApplicationContext.cs
- VBIdentifierDesigner.xaml.cs
- Rect3DValueSerializer.cs
- PerfCounters.cs
- Encoding.cs
- CommonDialog.cs
- EpmSyndicationContentSerializer.cs
- HijriCalendar.cs
- ConfigurationManagerInternalFactory.cs
- AsymmetricKeyExchangeFormatter.cs
- DataServiceResponse.cs
- ClientEventManager.cs
- CodeIterationStatement.cs
- CompilationRelaxations.cs
- PlatformNotSupportedException.cs
- XPathDescendantIterator.cs
- DynamicObjectAccessor.cs
- ConfigurationLocation.cs
- CollectionBuilder.cs
- UdpMessageProperty.cs
- FigureParagraph.cs
- DecimalAnimationBase.cs
- RectKeyFrameCollection.cs
- SecureEnvironment.cs