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
- UIElementIsland.cs
- PersonalizationStateQuery.cs
- MdImport.cs
- StringAnimationUsingKeyFrames.cs
- SystemKeyConverter.cs
- HtmlSelectionListAdapter.cs
- ListBoxAutomationPeer.cs
- ApplicationGesture.cs
- UIElement3D.cs
- MappingSource.cs
- WSFederationHttpSecurityMode.cs
- WindowsListViewItemStartMenu.cs
- DecoderReplacementFallback.cs
- CodeDirectionExpression.cs
- IdentityHolder.cs
- XmlToDatasetMap.cs
- XomlCompilerError.cs
- WSSecurityXXX2005.cs
- SqlConnectionStringBuilder.cs
- NameValuePair.cs
- InvalidPrinterException.cs
- PassportAuthenticationModule.cs
- ReadOnlyHierarchicalDataSource.cs
- SEHException.cs
- ActivationArguments.cs
- AssemblyBuilder.cs
- PropertyMapper.cs
- MultiViewDesigner.cs
- GridView.cs
- DataView.cs
- ISAPIApplicationHost.cs
- TempFiles.cs
- _ShellExpression.cs
- XmlSchemaInferenceException.cs
- AtomServiceDocumentSerializer.cs
- PenThreadPool.cs
- IntSecurity.cs
- TableColumn.cs
- CultureTable.cs
- SkipStoryboardToFill.cs
- DataGridViewCheckBoxColumn.cs
- ModelFunction.cs
- CodeNamespaceImportCollection.cs
- TablePattern.cs
- AdapterDictionary.cs
- HwndKeyboardInputProvider.cs
- BamlRecords.cs
- CodeLabeledStatement.cs
- CustomCredentialPolicy.cs
- XmlCodeExporter.cs
- SchemaImporterExtension.cs
- SecurityException.cs
- CorePropertiesFilter.cs
- AutoResizedEvent.cs
- MetafileEditor.cs
- DefaultAssemblyResolver.cs
- PolyLineSegmentFigureLogic.cs
- InternalResources.cs
- XmlSchemaComplexContent.cs
- ViewStateException.cs
- Vertex.cs
- BooleanConverter.cs
- Membership.cs
- RemotingConfigParser.cs
- BufferedGraphics.cs
- CqlErrorHelper.cs
- ApplyImportsAction.cs
- XmlNodeChangedEventManager.cs
- Section.cs
- SQLDecimal.cs
- HtmlTableRowCollection.cs
- LinkLabel.cs
- DependencyPropertyAttribute.cs
- ArcSegment.cs
- PageBuildProvider.cs
- ListItemCollection.cs
- Image.cs
- ListItemCollection.cs
- NumericUpDown.cs
- KeyPullup.cs
- ContentElement.cs
- SqlXmlStorage.cs
- METAHEADER.cs
- IdentifierCreationService.cs
- ViewLoader.cs
- MSAAWinEventWrap.cs
- GroupItemAutomationPeer.cs
- ResourceProviderFactory.cs
- SourceFileBuildProvider.cs
- DocumentViewerBase.cs
- Rotation3DAnimationBase.cs
- Debug.cs
- CopyOfAction.cs
- Mutex.cs
- LinkDescriptor.cs
- ConfigurationValidatorBase.cs
- SuppressIldasmAttribute.cs
- SoapFault.cs
- infer.cs
- DynamicObjectAccessor.cs