Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- DataGridState.cs
- XmlSchemaDocumentation.cs
- Panel.cs
- UIElementAutomationPeer.cs
- DispatchProxy.cs
- OneOfConst.cs
- QilLiteral.cs
- QueryContext.cs
- Group.cs
- OperationResponse.cs
- OleDbRowUpdatedEvent.cs
- ToolStripDropDown.cs
- GridItem.cs
- CalendarDay.cs
- EncoderFallback.cs
- ConcurrentStack.cs
- ResourcePermissionBase.cs
- CheckedPointers.cs
- PlacementWorkspace.cs
- LogExtentCollection.cs
- HttpRequest.cs
- StylusDevice.cs
- ProcessModelInfo.cs
- DelegatedStream.cs
- MembershipSection.cs
- ExpressionBuilderCollection.cs
- CodeDirectoryCompiler.cs
- AbandonedMutexException.cs
- LoginView.cs
- DateRangeEvent.cs
- BasicExpressionVisitor.cs
- DrawingServices.cs
- SchemaInfo.cs
- DispatcherProcessingDisabled.cs
- VisualBrush.cs
- Maps.cs
- LineInfo.cs
- BoundColumn.cs
- UInt32Converter.cs
- XmlSchemaSet.cs
- EventLogPermissionEntryCollection.cs
- AttributeEmitter.cs
- RNGCryptoServiceProvider.cs
- HwndStylusInputProvider.cs
- ResourceAssociationType.cs
- ClockGroup.cs
- MTConfigUtil.cs
- ViewSimplifier.cs
- TextEditorCopyPaste.cs
- ClientConvert.cs
- AttachedAnnotationChangedEventArgs.cs
- SqlGatherProducedAliases.cs
- JournalNavigationScope.cs
- MimeMapping.cs
- HwndHost.cs
- DBSqlParserTable.cs
- SignedXml.cs
- ContainerUtilities.cs
- SpotLight.cs
- MultiView.cs
- ServiceThrottlingBehavior.cs
- RequestQueryProcessor.cs
- EntitySqlException.cs
- UnsafePeerToPeerMethods.cs
- OdbcCommandBuilder.cs
- RoutedEventHandlerInfo.cs
- Repeater.cs
- ScriptResourceMapping.cs
- ActiveXHelper.cs
- DataListItemEventArgs.cs
- BindingMAnagerBase.cs
- BitmapEffect.cs
- ContainerFilterService.cs
- RenameRuleObjectDialog.Designer.cs
- TaskScheduler.cs
- ActivityExecutionContextCollection.cs
- RemoteHelper.cs
- MissingFieldException.cs
- ComponentResourceKey.cs
- SqlFormatter.cs
- AuthenticationModuleElement.cs
- CopyOfAction.cs
- SolidColorBrush.cs
- GradientStop.cs
- XPathBuilder.cs
- UriSection.cs
- MulticastIPAddressInformationCollection.cs
- NativeMethods.cs
- PasswordBoxAutomationPeer.cs
- AssertSection.cs
- OSFeature.cs
- SqlRetyper.cs
- DuplicateWaitObjectException.cs
- ImageListUtils.cs
- DataTableReaderListener.cs
- FunctionDetailsReader.cs
- MissingMemberException.cs
- TextBoxAutoCompleteSourceConverter.cs
- ColorMatrix.cs
- VirtualDirectoryMappingCollection.cs