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
- NetworkInterface.cs
- SafeEventHandle.cs
- ToolStripRenderer.cs
- TextDataBindingHandler.cs
- EntityParameterCollection.cs
- QilBinary.cs
- ToolStripContainerActionList.cs
- StateChangeEvent.cs
- StreamSecurityUpgradeInitiatorAsyncResult.cs
- Expression.cs
- EncoderReplacementFallback.cs
- TreeView.cs
- DependentList.cs
- DbParameterCollectionHelper.cs
- EntitySqlQueryCacheKey.cs
- MemberMaps.cs
- DependencyObject.cs
- WebProxyScriptElement.cs
- XmlNamespaceMapping.cs
- ImageInfo.cs
- TypeResolver.cs
- ModelItem.cs
- SqlBuilder.cs
- AndCondition.cs
- RectAnimationUsingKeyFrames.cs
- WorkflowMarkupSerializationException.cs
- loginstatus.cs
- PageAsyncTask.cs
- PropertyKey.cs
- ScriptManagerProxy.cs
- ListViewItemSelectionChangedEvent.cs
- SystemTcpStatistics.cs
- RuntimeResourceSet.cs
- Transform3D.cs
- ServiceManager.cs
- EnumerableRowCollection.cs
- _NegoState.cs
- SelectedGridItemChangedEvent.cs
- Aggregates.cs
- TreeView.cs
- Wildcard.cs
- InvokePattern.cs
- EdmEntityTypeAttribute.cs
- InstanceValue.cs
- ParsedAttributeCollection.cs
- DurableTimerExtension.cs
- IApplicationTrustManager.cs
- KeyEvent.cs
- RoutingBehavior.cs
- DataListItemCollection.cs
- CmsUtils.cs
- OleDbCommandBuilder.cs
- DependencyProperty.cs
- PersonalizationDictionary.cs
- PartManifestEntry.cs
- FixedSOMContainer.cs
- X509Certificate.cs
- WebPartsSection.cs
- metadatamappinghashervisitor.cs
- ClientScriptManagerWrapper.cs
- DescendantBaseQuery.cs
- LayoutEditorPart.cs
- DodSequenceMerge.cs
- BinaryUtilClasses.cs
- DataGridItemCollection.cs
- SvcFileManager.cs
- CompilationPass2TaskInternal.cs
- ControlPaint.cs
- FlowNode.cs
- DocumentPaginator.cs
- DbModificationClause.cs
- FakeModelPropertyImpl.cs
- CLRBindingWorker.cs
- WebHttpBindingCollectionElement.cs
- XmlSchemaComplexType.cs
- ResXResourceWriter.cs
- DBAsyncResult.cs
- TimelineGroup.cs
- ActivationServices.cs
- XMLSyntaxException.cs
- ManipulationDevice.cs
- ColorConverter.cs
- IList.cs
- PartialArray.cs
- FileSystemInfo.cs
- SystemPens.cs
- TextElementEditingBehaviorAttribute.cs
- MouseButtonEventArgs.cs
- ServiceDurableInstanceContextProvider.cs
- ReadOnlyCollection.cs
- ViewUtilities.cs
- DelayLoadType.cs
- CurrencyManager.cs
- AssemblyBuilder.cs
- HasCopySemanticsAttribute.cs
- ClaimSet.cs
- VarRemapper.cs
- CssClassPropertyAttribute.cs
- ToolStripPanelSelectionGlyph.cs
- WebServiceParameterData.cs