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
- HttpDebugHandler.cs
- AppSettingsExpressionBuilder.cs
- ServiceModelPerformanceCounters.cs
- IisTraceListener.cs
- Wizard.cs
- ConvertersCollection.cs
- QuaternionAnimationBase.cs
- DockAndAnchorLayout.cs
- ProfilePropertySettingsCollection.cs
- SizeLimitedCache.cs
- HttpCapabilitiesSectionHandler.cs
- CodeTypeDeclarationCollection.cs
- XamlStream.cs
- CachedRequestParams.cs
- SessionState.cs
- TypeForwardedFromAttribute.cs
- Int32AnimationBase.cs
- List.cs
- WeakHashtable.cs
- ValueUtilsSmi.cs
- RequestContext.cs
- MailAddressCollection.cs
- ResourceReferenceExpressionConverter.cs
- Animatable.cs
- GACMembershipCondition.cs
- ImageMetadata.cs
- MouseOverProperty.cs
- WorkflowServiceBuildProvider.cs
- MultipartContentParser.cs
- ComplexTypeEmitter.cs
- FormatVersion.cs
- FlowNode.cs
- MissingFieldException.cs
- ErrorProvider.cs
- LabelAutomationPeer.cs
- CompensatableSequenceActivity.cs
- DataSourceViewSchemaConverter.cs
- KnownAssembliesSet.cs
- CustomAttributeBuilder.cs
- HandlerBase.cs
- PerformanceCounterPermissionEntry.cs
- clipboard.cs
- AuthenticationSection.cs
- BitmapEffectOutputConnector.cs
- LambdaCompiler.cs
- WebChannelFactory.cs
- AutoGeneratedFieldProperties.cs
- BindingWorker.cs
- AncestorChangedEventArgs.cs
- CornerRadius.cs
- SerializationBinder.cs
- CommentAction.cs
- IPAddressCollection.cs
- SrgsElementList.cs
- DesignTimeType.cs
- ThreadStaticAttribute.cs
- PackageStore.cs
- TextFormatterHost.cs
- SplineQuaternionKeyFrame.cs
- HttpListenerException.cs
- FormatVersion.cs
- LowerCaseStringConverter.cs
- GcHandle.cs
- ReadingWritingEntityEventArgs.cs
- StrokeFIndices.cs
- RegularExpressionValidator.cs
- OdbcParameter.cs
- TempFiles.cs
- ColorDialog.cs
- SessionPageStatePersister.cs
- CacheHelper.cs
- FileUtil.cs
- GridSplitter.cs
- ClientBuildManager.cs
- Constants.cs
- WhitespaceRuleReader.cs
- ProcessModule.cs
- invalidudtexception.cs
- ZoneMembershipCondition.cs
- InfoCardProofToken.cs
- WorkflowDataContext.cs
- WebPartCollection.cs
- ToolBarPanel.cs
- TextContainerChangedEventArgs.cs
- BaseTemplateBuildProvider.cs
- OrderedDictionary.cs
- FocusChangedEventArgs.cs
- BuildManagerHost.cs
- ConfigXmlText.cs
- StylusShape.cs
- ProcessHostConfigUtils.cs
- FormViewDesigner.cs
- BindingExpressionBase.cs
- TreeViewCancelEvent.cs
- DBSchemaTable.cs
- DataGridViewComboBoxEditingControl.cs
- ObjectListComponentEditor.cs
- InvalidCastException.cs
- FlowNode.cs
- FixedSOMGroup.cs