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
- _RequestLifetimeSetter.cs
- XmlBufferReader.cs
- XmlRootAttribute.cs
- TabletDeviceInfo.cs
- IIS7WorkerRequest.cs
- XhtmlBasicControlAdapter.cs
- CrossAppDomainChannel.cs
- FormatSelectingMessageInspector.cs
- CacheHelper.cs
- SQLDouble.cs
- BorderGapMaskConverter.cs
- QuotedPairReader.cs
- GeneralTransform3DCollection.cs
- VarRemapper.cs
- SchemaInfo.cs
- DataGridColumnsPage.cs
- AttributeTable.cs
- NoPersistProperty.cs
- XmlFileEditor.cs
- XmlSchemaComplexContentRestriction.cs
- RootDesignerSerializerAttribute.cs
- CurrentChangingEventArgs.cs
- initElementDictionary.cs
- IMembershipProvider.cs
- UmAlQuraCalendar.cs
- ParamArrayAttribute.cs
- WpfGeneratedKnownTypes.cs
- ErrorEventArgs.cs
- SchemaName.cs
- GridItemProviderWrapper.cs
- ComponentResourceManager.cs
- BinaryFormatterSinks.cs
- TransformerInfoCollection.cs
- BaseTemplateBuildProvider.cs
- EventWaitHandleSecurity.cs
- CompiledQueryCacheEntry.cs
- ObjectIDGenerator.cs
- UrlUtility.cs
- HtmlShim.cs
- EntityObject.cs
- PreservationFileWriter.cs
- MediaTimeline.cs
- UnsafeNativeMethods.cs
- dbdatarecord.cs
- QilPatternFactory.cs
- StatusBarItemAutomationPeer.cs
- InputScopeConverter.cs
- HierarchicalDataSourceControl.cs
- Regex.cs
- ResourceSetExpression.cs
- XamlPointCollectionSerializer.cs
- SHA256Managed.cs
- ResourcesBuildProvider.cs
- WeakReadOnlyCollection.cs
- SocketAddress.cs
- ResourceManagerWrapper.cs
- Dictionary.cs
- IncrementalHitTester.cs
- QuestionEventArgs.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- SchemaCollectionCompiler.cs
- ListViewGroupConverter.cs
- TreeNodeCollectionEditor.cs
- EditingScopeUndoUnit.cs
- Registry.cs
- TypeToken.cs
- DataGridViewMethods.cs
- TreeView.cs
- OracleBFile.cs
- TextMarkerSource.cs
- TransformedBitmap.cs
- LoginView.cs
- InputLanguageEventArgs.cs
- TypeSchema.cs
- DocumentGrid.cs
- DispatcherOperation.cs
- XmlNodeReader.cs
- CodeAssignStatement.cs
- rsa.cs
- XslAst.cs
- XslVisitor.cs
- SystemKeyConverter.cs
- BoundField.cs
- MouseButton.cs
- DocumentViewerBaseAutomationPeer.cs
- SafeProcessHandle.cs
- OptimisticConcurrencyException.cs
- altserialization.cs
- OutputScopeManager.cs
- BaseAsyncResult.cs
- SqlCommandSet.cs
- Asn1IntegerConverter.cs
- XmlSchemaType.cs
- DataViewManagerListItemTypeDescriptor.cs
- Brush.cs
- XPathSingletonIterator.cs
- SettingsAttributes.cs
- XmlWriter.cs
- Reference.cs
- SiteMapProvider.cs