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
- AddIn.cs
- StreamGeometry.cs
- BezierSegment.cs
- Metafile.cs
- StringSource.cs
- UTF32Encoding.cs
- InstanceCreationEditor.cs
- PrivilegeNotHeldException.cs
- MenuEventArgs.cs
- ClonableStack.cs
- Application.cs
- DesignerSerializationOptionsAttribute.cs
- AppLevelCompilationSectionCache.cs
- RuntimeCompatibilityAttribute.cs
- CodeDelegateCreateExpression.cs
- BrushValueSerializer.cs
- RemoteWebConfigurationHostServer.cs
- GridItemProviderWrapper.cs
- DataBindingExpressionBuilder.cs
- ProviderBase.cs
- TrustSection.cs
- Logging.cs
- SchemaElementDecl.cs
- XmlChildNodes.cs
- StrongNameUtility.cs
- InkSerializer.cs
- CalendarDay.cs
- TrackingRecord.cs
- ControlParameter.cs
- UnicodeEncoding.cs
- BitmapPalette.cs
- TypeExtensionConverter.cs
- WebSysDescriptionAttribute.cs
- ConnectionProviderAttribute.cs
- ConfigLoader.cs
- Lasso.cs
- ColorContext.cs
- DiagnosticsConfiguration.cs
- DataGridViewButtonColumn.cs
- BamlBinaryReader.cs
- ReadContentAsBinaryHelper.cs
- UserPreference.cs
- ParagraphResult.cs
- UnsafeNativeMethods.cs
- IERequestCache.cs
- TreeView.cs
- FormCollection.cs
- parserscommon.cs
- DataObject.cs
- DataGridViewHeaderCell.cs
- SafeArchiveContext.cs
- InitializerFacet.cs
- SafeArrayTypeMismatchException.cs
- parserscommon.cs
- TrustSection.cs
- DataTableClearEvent.cs
- FastEncoderWindow.cs
- ObjectReferenceStack.cs
- SqlDependencyListener.cs
- SourceFilter.cs
- CodeTypeDeclarationCollection.cs
- EventLogPermissionEntry.cs
- FieldNameLookup.cs
- NavigationHelper.cs
- GridErrorDlg.cs
- WindowsFormsHostPropertyMap.cs
- EntryIndex.cs
- ViewStateException.cs
- InlineObject.cs
- DbCommandDefinition.cs
- PkcsUtils.cs
- TypeExtensionConverter.cs
- GridViewDeletedEventArgs.cs
- SubstitutionList.cs
- RecordsAffectedEventArgs.cs
- XmlDocumentFragment.cs
- wgx_commands.cs
- UpdateEventArgs.cs
- HttpEncoder.cs
- ChtmlTextWriter.cs
- ProjectedSlot.cs
- SafeNativeMethods.cs
- ProcessHostFactoryHelper.cs
- UidManager.cs
- Int32.cs
- LocationSectionRecord.cs
- ContainerUtilities.cs
- SpnEndpointIdentityExtension.cs
- KeysConverter.cs
- EncoderNLS.cs
- WindowsListViewItemCheckBox.cs
- Message.cs
- StateBag.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- IERequestCache.cs
- EntityStoreSchemaFilterEntry.cs
- TimerEventSubscription.cs
- DefaultHttpHandler.cs
- OciEnlistContext.cs
- followingsibling.cs