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
- Transform3DGroup.cs
- ColorConvertedBitmap.cs
- ClientSettingsProvider.cs
- SoapException.cs
- TokenBasedSet.cs
- AssemblyName.cs
- DataSourceSerializationException.cs
- CompiledAction.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- LinqDataSourceDisposeEventArgs.cs
- ListControl.cs
- columnmapfactory.cs
- TableLayoutSettingsTypeConverter.cs
- EmbeddedMailObject.cs
- PropertyToken.cs
- TdsParserSessionPool.cs
- ExpandedWrapper.cs
- MarkupExtensionReturnTypeAttribute.cs
- BindableAttribute.cs
- assertwrapper.cs
- DynamicMethod.cs
- ScrollableControlDesigner.cs
- MultiView.cs
- WebPartCollection.cs
- OdbcTransaction.cs
- glyphs.cs
- ResourceAttributes.cs
- QueryOutputWriter.cs
- TypeGenericEnumerableViewSchema.cs
- SqlCacheDependencyDatabaseCollection.cs
- XmlChildEnumerator.cs
- Single.cs
- ForceCopyBuildProvider.cs
- OutKeywords.cs
- DataGridViewAccessibleObject.cs
- Hex.cs
- ServiceTimeoutsBehavior.cs
- DriveNotFoundException.cs
- ThrowHelper.cs
- WebPartConnectionsCancelEventArgs.cs
- MtomMessageEncodingElement.cs
- connectionpool.cs
- WsdlInspector.cs
- XhtmlBasicFormAdapter.cs
- DomainUpDown.cs
- ConfigurationValidatorBase.cs
- HttpsChannelFactory.cs
- DbTypeMap.cs
- AxHost.cs
- ToolStripContainerActionList.cs
- ItemAutomationPeer.cs
- AbstractDataSvcMapFileLoader.cs
- QuaternionRotation3D.cs
- XmlSchemaSimpleContent.cs
- CheckBoxBaseAdapter.cs
- MissingSatelliteAssemblyException.cs
- FieldTemplateUserControl.cs
- HighlightComponent.cs
- WmiInstallComponent.cs
- CellCreator.cs
- MenuBindingsEditor.cs
- Interop.cs
- KeyTimeConverter.cs
- AdapterUtil.cs
- ColumnWidthChangedEvent.cs
- AssemblyCache.cs
- MessagePropertyAttribute.cs
- ApplicationFileParser.cs
- ProfilePropertySettings.cs
- VoiceObjectToken.cs
- TargetInvocationException.cs
- Polyline.cs
- IsolatedStorageFilePermission.cs
- OutputCacheSection.cs
- UpdatePanelControlTrigger.cs
- BindingNavigator.cs
- UniqueIdentifierService.cs
- ContentPlaceHolder.cs
- GridViewUpdatedEventArgs.cs
- SoapReflectionImporter.cs
- TextEndOfLine.cs
- TrackBarDesigner.cs
- SoapServerMethod.cs
- ResourcePool.cs
- DesignerActionPanel.cs
- OdbcStatementHandle.cs
- SqlBooleanMismatchVisitor.cs
- EnumMember.cs
- SingletonChannelAcceptor.cs
- MailBnfHelper.cs
- EventMappingSettings.cs
- XmlElementCollection.cs
- TextCompositionEventArgs.cs
- ElementHost.cs
- SQLByte.cs
- Stopwatch.cs
- ClientUrlResolverWrapper.cs
- Section.cs
- CodeAccessPermission.cs
- FileDialogPermission.cs