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
- QueryAccessibilityHelpEvent.cs
- BlockUIContainer.cs
- FileStream.cs
- PackageDigitalSignature.cs
- Action.cs
- WebPartDesigner.cs
- IdentityReference.cs
- InfiniteTimeSpanConverter.cs
- VerificationAttribute.cs
- StringFunctions.cs
- TextLineBreak.cs
- DrawingBrush.cs
- PointCollection.cs
- CheckPair.cs
- XmlSchemaAttributeGroupRef.cs
- Scheduler.cs
- DecodeHelper.cs
- SafeEventLogReadHandle.cs
- _AutoWebProxyScriptWrapper.cs
- HttpListenerException.cs
- ResourceWriter.cs
- CursorConverter.cs
- CornerRadiusConverter.cs
- SqlDataSourceQuery.cs
- ObjectParameter.cs
- CodeChecksumPragma.cs
- QilVisitor.cs
- Nullable.cs
- PassportPrincipal.cs
- NameValueSectionHandler.cs
- SHA1Managed.cs
- LogWriteRestartAreaState.cs
- AnnotationAuthorChangedEventArgs.cs
- RangeBase.cs
- RemotingService.cs
- WCFBuildProvider.cs
- ClientSettingsStore.cs
- SchemaLookupTable.cs
- EmptyArray.cs
- InkCanvas.cs
- ExtendedPropertyInfo.cs
- ImplicitInputBrush.cs
- SqlError.cs
- DbParameterHelper.cs
- ConfigurationStrings.cs
- CfgSemanticTag.cs
- SqlClientMetaDataCollectionNames.cs
- ListViewSelectEventArgs.cs
- TransformDescriptor.cs
- DesignerAdapterUtil.cs
- TypeNameConverter.cs
- GrammarBuilderWildcard.cs
- ScriptingJsonSerializationSection.cs
- WorkflowValidationFailedException.cs
- FillRuleValidation.cs
- BitStack.cs
- XmlSchemaObject.cs
- FontInfo.cs
- Version.cs
- HandlerElement.cs
- AtomEntry.cs
- InfoCardConstants.cs
- _SSPISessionCache.cs
- MouseWheelEventArgs.cs
- SHA1.cs
- KeyEventArgs.cs
- NavigateUrlConverter.cs
- Condition.cs
- HandlerFactoryCache.cs
- ValidationRuleCollection.cs
- SoapInteropTypes.cs
- DocumentManager.cs
- ChildDocumentBlock.cs
- CatalogPartDesigner.cs
- QuaternionValueSerializer.cs
- XmlSerializer.cs
- CacheForPrimitiveTypes.cs
- EventQueueState.cs
- Compiler.cs
- SortDescriptionCollection.cs
- Renderer.cs
- RegexCapture.cs
- FixedStringLookup.cs
- FlowDocumentPage.cs
- Transform.cs
- PolicyLevel.cs
- initElementDictionary.cs
- QilSortKey.cs
- HtmlSelect.cs
- WebReference.cs
- SqlCommandSet.cs
- ErrorRuntimeConfig.cs
- PeerTransportCredentialType.cs
- LogicalExpr.cs
- HttpInputStream.cs
- ServiceBuildProvider.cs
- WorkflowTimerService.cs
- ListBindingHelper.cs
- OverflowException.cs
- NodeFunctions.cs