Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Common / QueryCache / CompiledQueryCacheKey.cs / 1305376 / CompiledQueryCacheKey.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- 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 [....] // @backupOwner [....] //----------------------------------------------------------------------------- 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
- TextDecoration.cs
- Slider.cs
- TimelineGroup.cs
- EdmRelationshipRoleAttribute.cs
- UserPreferenceChangedEventArgs.cs
- DetailsViewUpdateEventArgs.cs
- FontFamilyValueSerializer.cs
- DataControlButton.cs
- XmlEnumAttribute.cs
- ChtmlTextWriter.cs
- AxisAngleRotation3D.cs
- SmiSettersStream.cs
- XamlPoint3DCollectionSerializer.cs
- NativeMethods.cs
- WebPartHeaderCloseVerb.cs
- TextModifierScope.cs
- DeferredReference.cs
- RtfNavigator.cs
- DbProviderManifest.cs
- CodeAttributeArgument.cs
- UpDownBase.cs
- SqlGenerator.cs
- Viewport3DVisual.cs
- CorruptStoreException.cs
- JavascriptCallbackBehaviorAttribute.cs
- CompareValidator.cs
- MasterPage.cs
- PolyQuadraticBezierSegment.cs
- SqlEnums.cs
- AsyncResult.cs
- SafeCryptoKeyHandle.cs
- OrderPreservingPipeliningMergeHelper.cs
- ScrollItemProviderWrapper.cs
- BoundPropertyEntry.cs
- EntityCollectionChangedParams.cs
- SingleAnimationBase.cs
- SrgsRule.cs
- StorageAssociationTypeMapping.cs
- SqlDuplicator.cs
- HashRepartitionEnumerator.cs
- HttpListenerException.cs
- PermissionRequestEvidence.cs
- StylusPointProperties.cs
- URLIdentityPermission.cs
- FixedDSBuilder.cs
- GlyphsSerializer.cs
- SchemaMapping.cs
- Nullable.cs
- Splitter.cs
- CrossSiteScriptingValidation.cs
- WebPartCancelEventArgs.cs
- DataQuery.cs
- BuildProvider.cs
- PathParser.cs
- SchemaType.cs
- LinqDataSourceSelectEventArgs.cs
- WindowClosedEventArgs.cs
- IncrementalHitTester.cs
- InternalRelationshipCollection.cs
- LingerOption.cs
- RepeaterDataBoundAdapter.cs
- WebPartUtil.cs
- LogConverter.cs
- InputScopeAttribute.cs
- CopyAttributesAction.cs
- AttachedPropertyDescriptor.cs
- PipelineComponent.cs
- ItemAutomationPeer.cs
- MenuItem.cs
- Condition.cs
- SystemUdpStatistics.cs
- ApplicationHost.cs
- DoubleLinkList.cs
- ServerIdentity.cs
- OdbcEnvironment.cs
- TimeSpanSecondsConverter.cs
- Point3DAnimationBase.cs
- DSASignatureFormatter.cs
- PropertyGridEditorPart.cs
- GenericTypeParameterBuilder.cs
- TemplateControl.cs
- ConfigurationSection.cs
- LogSwitch.cs
- ExtractedStateEntry.cs
- CodeThrowExceptionStatement.cs
- DoubleKeyFrameCollection.cs
- ScrollItemProviderWrapper.cs
- VariableAction.cs
- WindowsEditBox.cs
- ConnectionsZone.cs
- ZipPackagePart.cs
- SQLChars.cs
- WebContext.cs
- __TransparentProxy.cs
- SymmetricAlgorithm.cs
- ComboBoxDesigner.cs
- CodeCommentStatementCollection.cs
- ReadOnlyDictionary.cs
- DynamicPropertyHolder.cs
- controlskin.cs