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
- StickyNoteContentControl.cs
- SQLByteStorage.cs
- TemplateParser.cs
- UnsafeNativeMethods.cs
- WebAdminConfigurationHelper.cs
- XPathItem.cs
- ErrorReporting.cs
- RoleGroup.cs
- XmlSerializationGeneratedCode.cs
- TextSimpleMarkerProperties.cs
- StreamInfo.cs
- ImpersonateTokenRef.cs
- RightsManagementPermission.cs
- PersonalizationProvider.cs
- XPathMultyIterator.cs
- PointConverter.cs
- Char.cs
- HttpStreamXmlDictionaryReader.cs
- MediaEntryAttribute.cs
- ContainerActivationHelper.cs
- Object.cs
- EntityDesignerBuildProvider.cs
- ValidatorCompatibilityHelper.cs
- AnnotationMap.cs
- OleDbError.cs
- AsymmetricSignatureFormatter.cs
- WebUtil.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- FormsAuthenticationUserCollection.cs
- JapaneseLunisolarCalendar.cs
- Underline.cs
- Input.cs
- XamlPathDataSerializer.cs
- PropertyGrid.cs
- DoubleLink.cs
- Facet.cs
- x509utils.cs
- DesignerActionVerbItem.cs
- SynchronizedCollection.cs
- ControlBuilderAttribute.cs
- DataServiceOperationContext.cs
- HttpModuleActionCollection.cs
- XmlSchemaInferenceException.cs
- CanonicalizationDriver.cs
- SrgsElementList.cs
- OutputWindow.cs
- DataPagerFieldItem.cs
- RawStylusSystemGestureInputReport.cs
- CFStream.cs
- SecurityPolicySection.cs
- NullableBoolConverter.cs
- EntryWrittenEventArgs.cs
- CodeChecksumPragma.cs
- WebSysDescriptionAttribute.cs
- GlyphInfoList.cs
- WinEventTracker.cs
- StringUtil.cs
- _LocalDataStore.cs
- storepermission.cs
- SerializationTrace.cs
- ProtocolElement.cs
- ObjectMemberMapping.cs
- SvcMapFile.cs
- HoistedLocals.cs
- ServiceBuildProvider.cs
- ColumnProvider.cs
- InvalidOleVariantTypeException.cs
- CachedResourceDictionaryExtension.cs
- WebPartDescription.cs
- DataColumnCollection.cs
- ConfigurationValue.cs
- ButtonColumn.cs
- SingleKeyFrameCollection.cs
- ItemsChangedEventArgs.cs
- DataPagerFieldCommandEventArgs.cs
- _ScatterGatherBuffers.cs
- Stopwatch.cs
- XmlAttributeCollection.cs
- CharEntityEncoderFallback.cs
- PasswordRecoveryAutoFormat.cs
- ServiceOperationListItemList.cs
- RolePrincipal.cs
- PropertyValidationContext.cs
- LexicalChunk.cs
- PromptBuilder.cs
- SecurityResources.cs
- WaveHeader.cs
- ServerIdentity.cs
- ToolStripLabel.cs
- ButtonBase.cs
- XXXInfos.cs
- CustomTrackingRecord.cs
- TargetFrameworkAttribute.cs
- WSHttpTransportSecurityElement.cs
- GridViewActionList.cs
- GroupStyle.cs
- BinaryConverter.cs
- ArrayTypeMismatchException.cs
- PathFigure.cs
- LayoutEngine.cs