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
- HtmlTable.cs
- ExpressionBuilderCollection.cs
- ObfuscateAssemblyAttribute.cs
- DataTableExtensions.cs
- SelectionEditor.cs
- DispatcherExceptionEventArgs.cs
- Stacktrace.cs
- XmlSchemaAttributeGroup.cs
- InstanceData.cs
- AdvancedBindingEditor.cs
- XPathScanner.cs
- RoleManagerModule.cs
- BitmapEffectDrawingContextWalker.cs
- PingReply.cs
- UtilityExtension.cs
- InvalidPipelineStoreException.cs
- QueryPageSettingsEventArgs.cs
- SamlAdvice.cs
- UnconditionalPolicy.cs
- ArgIterator.cs
- ScriptingWebServicesSectionGroup.cs
- OdbcInfoMessageEvent.cs
- versioninfo.cs
- Reference.cs
- DeviceContext2.cs
- SamlAuthenticationClaimResource.cs
- Monitor.cs
- DataTrigger.cs
- IriParsingElement.cs
- SByte.cs
- Label.cs
- _FtpDataStream.cs
- DesignerVerb.cs
- Int64Storage.cs
- GeneratedContractType.cs
- InkCanvasAutomationPeer.cs
- ImageCollectionCodeDomSerializer.cs
- EdmType.cs
- Permission.cs
- DataViewSetting.cs
- MimeTypeAttribute.cs
- InputScope.cs
- DeclaredTypeElementCollection.cs
- XmlNode.cs
- StructuralCache.cs
- CommentEmitter.cs
- ObjectFullSpanRewriter.cs
- XmlSchemaProviderAttribute.cs
- IImplicitResourceProvider.cs
- CatalogZone.cs
- SyndicationLink.cs
- ObjectComplexPropertyMapping.cs
- ControlBindingsConverter.cs
- SurrogateDataContract.cs
- CredentialCache.cs
- SizeF.cs
- OperatorExpressions.cs
- HttpRawResponse.cs
- BuildResult.cs
- HttpPostedFileBase.cs
- ListBoxAutomationPeer.cs
- PlacementWorkspace.cs
- XmlSchemaComplexContentRestriction.cs
- Vector3D.cs
- ReferentialConstraint.cs
- TransportManager.cs
- Rotation3D.cs
- Nullable.cs
- ArrangedElementCollection.cs
- FillBehavior.cs
- ProfilePropertyNameValidator.cs
- UInt16.cs
- RelationshipEndMember.cs
- TypeSystem.cs
- DataGridViewColumnDesigner.cs
- GeneralTransformGroup.cs
- TextLine.cs
- WorkflowApplicationIdleEventArgs.cs
- MemberRestriction.cs
- TextLineBreak.cs
- WebPartConnectionCollection.cs
- ElementNotEnabledException.cs
- ExpressionBinding.cs
- EditingCoordinator.cs
- HandleRef.cs
- HMACMD5.cs
- ToolStripLabel.cs
- URLMembershipCondition.cs
- smtppermission.cs
- WebServiceTypeData.cs
- LeafCellTreeNode.cs
- Compiler.cs
- SQLConvert.cs
- ComPlusContractBehavior.cs
- ModelVisual3D.cs
- RemoteWebConfigurationHostStream.cs
- CheckBoxAutomationPeer.cs
- WindowsComboBox.cs
- EmulateRecognizeCompletedEventArgs.cs
- StylusTip.cs