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
- CompiledAction.cs
- InputMethodStateTypeInfo.cs
- ExpressionPrefixAttribute.cs
- diagnosticsswitches.cs
- SynchronizingStream.cs
- IndicCharClassifier.cs
- CommandID.cs
- KerberosSecurityTokenProvider.cs
- Baml2006Reader.cs
- ToggleButton.cs
- OpenTypeLayoutCache.cs
- DtdParser.cs
- DbSourceCommand.cs
- TransactionException.cs
- XmlAnyElementAttribute.cs
- DataMemberListEditor.cs
- ConnectionPoint.cs
- MenuItemBindingCollection.cs
- wgx_commands.cs
- CachedPathData.cs
- DataSourceCache.cs
- SchemaAttDef.cs
- GroupBox.cs
- DataGridViewBindingCompleteEventArgs.cs
- ExpressionTextBox.xaml.cs
- HijriCalendar.cs
- FloatAverageAggregationOperator.cs
- EdmSchemaError.cs
- OptimizedTemplateContentHelper.cs
- WebDescriptionAttribute.cs
- PriorityQueue.cs
- PerformanceCounterPermission.cs
- ScriptingWebServicesSectionGroup.cs
- CleanUpVirtualizedItemEventArgs.cs
- TableLayoutCellPaintEventArgs.cs
- PackageDigitalSignature.cs
- SqlRowUpdatingEvent.cs
- DbConnectionPoolIdentity.cs
- SystemFonts.cs
- FrameworkRichTextComposition.cs
- ServiceOperationInfoTypeConverter.cs
- ValidationEventArgs.cs
- JournalEntryListConverter.cs
- XmlQueryCardinality.cs
- StateValidator.cs
- CngUIPolicy.cs
- X509Extension.cs
- SafeFindHandle.cs
- WebControlsSection.cs
- MachineKeyValidationConverter.cs
- SqlServer2KCompatibilityCheck.cs
- Column.cs
- RadioButton.cs
- WebPartVerbCollection.cs
- ClientSettingsProvider.cs
- GetRecipientRequest.cs
- DataGridViewRowEventArgs.cs
- EventMappingSettings.cs
- IconHelper.cs
- HeaderUtility.cs
- MemoryRecordBuffer.cs
- TableColumnCollection.cs
- CleanUpVirtualizedItemEventArgs.cs
- ImportDesigner.xaml.cs
- PersistenceTypeAttribute.cs
- DecimalAnimationUsingKeyFrames.cs
- validation.cs
- ServicePoint.cs
- AssociatedControlConverter.cs
- BinaryNode.cs
- NullRuntimeConfig.cs
- DisplayMemberTemplateSelector.cs
- FileSystemWatcher.cs
- SystemNetHelpers.cs
- XmlMembersMapping.cs
- NamespaceList.cs
- IndividualDeviceConfig.cs
- KnownBoxes.cs
- SID.cs
- XPathAncestorQuery.cs
- DbTypeMap.cs
- MaskDescriptor.cs
- ZipFileInfo.cs
- SByteStorage.cs
- WebPartDisplayModeCancelEventArgs.cs
- MemberProjectedSlot.cs
- AmbientValueAttribute.cs
- TypeName.cs
- DataGridViewLayoutData.cs
- COM2ExtendedBrowsingHandler.cs
- DependencyObjectType.cs
- MachineKeySection.cs
- DiagnosticTraceSource.cs
- TableCellCollection.cs
- Options.cs
- BufferedMessageData.cs
- ITextView.cs
- SafeHandles.cs
- StateRuntime.cs
- NotFiniteNumberException.cs