Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- WebPartTransformerAttribute.cs
- SafeNativeMethodsOther.cs
- BinaryFormatterWriter.cs
- EntitySet.cs
- DocumentPaginator.cs
- MethodBuilderInstantiation.cs
- RegistrationServices.cs
- SR.cs
- ApplicationProxyInternal.cs
- MLangCodePageEncoding.cs
- WindowsStatic.cs
- Transform.cs
- SystemIPGlobalStatistics.cs
- Rect3DConverter.cs
- LineVisual.cs
- NativeMethods.cs
- _TransmitFileOverlappedAsyncResult.cs
- QilFunction.cs
- ping.cs
- BulletedList.cs
- ScriptManagerProxy.cs
- XmlSchemaCollection.cs
- MDIClient.cs
- ImpersonationContext.cs
- WebReferencesBuildProvider.cs
- GradientSpreadMethodValidation.cs
- OdbcError.cs
- ApplicationProxyInternal.cs
- M3DUtil.cs
- XamlSerializerUtil.cs
- HtmlButton.cs
- XmlFormatExtensionPointAttribute.cs
- TreeViewItemAutomationPeer.cs
- _NegotiateClient.cs
- DockProviderWrapper.cs
- TemplatePagerField.cs
- SoapFormatterSinks.cs
- StrongNameUtility.cs
- FrameworkReadOnlyPropertyMetadata.cs
- SID.cs
- DelimitedListTraceListener.cs
- HandleCollector.cs
- RowVisual.cs
- TemplateAction.cs
- GAC.cs
- ThreadInterruptedException.cs
- Validator.cs
- PolicyException.cs
- DirectionalLight.cs
- RoutedEvent.cs
- DescriptionAttribute.cs
- WebConfigurationHost.cs
- ADMembershipProvider.cs
- SqlNodeTypeOperators.cs
- BindMarkupExtensionSerializer.cs
- Effect.cs
- OleDbConnection.cs
- Config.cs
- CharConverter.cs
- _FtpDataStream.cs
- FixUp.cs
- OptimalBreakSession.cs
- UrlPropertyAttribute.cs
- ISAPIWorkerRequest.cs
- SerialErrors.cs
- DataViewSettingCollection.cs
- XPathAncestorQuery.cs
- TextEncodedRawTextWriter.cs
- UnknownWrapper.cs
- PartialClassGenerationTaskInternal.cs
- SamlSecurityTokenAuthenticator.cs
- XmlCharCheckingReader.cs
- tooltip.cs
- GeneralTransform3DTo2D.cs
- unsafenativemethodsother.cs
- TransformPatternIdentifiers.cs
- RoleGroupCollection.cs
- CmsInterop.cs
- WebEncodingValidatorAttribute.cs
- RegexFCD.cs
- UnionCqlBlock.cs
- SqlFileStream.cs
- DrawingAttributesDefaultValueFactory.cs
- Terminate.cs
- Globals.cs
- ObjectQueryProvider.cs
- ListItemParagraph.cs
- TreeNode.cs
- ApplicationSecurityInfo.cs
- HttpHandlerAction.cs
- HttpRequest.cs
- HyperLink.cs
- ModelTypeConverter.cs
- NativeMethods.cs
- DesignParameter.cs
- XhtmlBasicTextBoxAdapter.cs
- SelectedGridItemChangedEvent.cs
- Variant.cs
- CodeAccessSecurityEngine.cs
- XmlSchemaAttribute.cs