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
- KnownTypesHelper.cs
- ArgumentReference.cs
- BuildResultCache.cs
- ObjectTag.cs
- DefaultDialogButtons.cs
- AnimationLayer.cs
- HotSpot.cs
- QueryableDataSourceEditData.cs
- SimpleType.cs
- XmlSchemaSimpleContent.cs
- ZipIOExtraFieldElement.cs
- PhonemeEventArgs.cs
- HttpModulesSection.cs
- AutomationPropertyInfo.cs
- XsdBuildProvider.cs
- TransportConfigurationTypeElementCollection.cs
- XmlBinaryReader.cs
- ScopedKnownTypes.cs
- XmlDataCollection.cs
- DataGridRowDetailsEventArgs.cs
- Perspective.cs
- recordstate.cs
- Inline.cs
- XmlBinaryWriterSession.cs
- CheckBoxList.cs
- MasterPageBuildProvider.cs
- ToolboxCategory.cs
- DateTimeOffsetStorage.cs
- SizeAnimationUsingKeyFrames.cs
- MemoryMappedViewStream.cs
- SmiEventSink.cs
- HtmlProps.cs
- UpdateManifestForBrowserApplication.cs
- ContentElement.cs
- PropertyEntry.cs
- XmlSchemaExporter.cs
- CommandManager.cs
- WebPartDisplayModeCollection.cs
- RegexWorker.cs
- SchemaElementLookUpTable.cs
- LinqExpressionNormalizer.cs
- CatalogZoneAutoFormat.cs
- IRCollection.cs
- DispatcherTimer.cs
- TextMetrics.cs
- MetaType.cs
- OperationPickerDialog.designer.cs
- SafeUserTokenHandle.cs
- DiscreteKeyFrames.cs
- FileUtil.cs
- ExpanderAutomationPeer.cs
- Help.cs
- StatusBarPanelClickEvent.cs
- RequestUriProcessor.cs
- OpacityConverter.cs
- ImageField.cs
- MtomMessageEncoder.cs
- StaticFileHandler.cs
- ListenerSessionConnectionReader.cs
- AssemblyCollection.cs
- ForwardPositionQuery.cs
- DocumentPageTextView.cs
- ComponentEditorForm.cs
- UpdatePanelTriggerCollection.cs
- FaultReasonText.cs
- SafeMILHandle.cs
- SqlResolver.cs
- HtmlTableCellCollection.cs
- StrongNameKeyPair.cs
- PassportAuthenticationModule.cs
- TextElement.cs
- AdobeCFFWrapper.cs
- PolicyStatement.cs
- ExtensionWindow.cs
- XamlDesignerSerializationManager.cs
- SerializerDescriptor.cs
- ServerIdentity.cs
- DerivedKeySecurityToken.cs
- SortedList.cs
- FieldMetadata.cs
- DSASignatureFormatter.cs
- DbConnectionFactory.cs
- QilCloneVisitor.cs
- SplineQuaternionKeyFrame.cs
- TraceListeners.cs
- StorageInfo.cs
- XmlSerializableWriter.cs
- BulletDecorator.cs
- TemplateNameScope.cs
- DbConnectionPoolOptions.cs
- EntryWrittenEventArgs.cs
- SqlInternalConnectionTds.cs
- StatusBar.cs
- Accessible.cs
- DCSafeHandle.cs
- PageThemeParser.cs
- HttpValueCollection.cs
- TransformerInfoCollection.cs
- TableNameAttribute.cs
- IgnoreSection.cs