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
- ExceptionHandlers.cs
- ToolStripSystemRenderer.cs
- filewebresponse.cs
- StyleXamlTreeBuilder.cs
- IntSecurity.cs
- XamlStream.cs
- X509CertificateStore.cs
- TimerElapsedEvenArgs.cs
- WsiProfilesElementCollection.cs
- CodeMemberProperty.cs
- BitmapMetadataEnumerator.cs
- DeclaredTypeValidatorAttribute.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- ArrangedElement.cs
- Point3DAnimationUsingKeyFrames.cs
- ProviderBase.cs
- GridViewAutomationPeer.cs
- WindowsMenu.cs
- ThrowHelper.cs
- DbBuffer.cs
- HttpPostedFile.cs
- WebPartConnectionsDisconnectVerb.cs
- VersionUtil.cs
- AnimationClock.cs
- TableSectionStyle.cs
- ConfigurationManagerInternal.cs
- SystemNetHelpers.cs
- DnsPermission.cs
- CodeGeneratorOptions.cs
- OneWayBindingElement.cs
- SrgsRuleRef.cs
- MessagePartSpecification.cs
- DesigntimeLicenseContext.cs
- DirectoryLocalQuery.cs
- SourceSwitch.cs
- Addressing.cs
- XNodeSchemaApplier.cs
- XamlGridLengthSerializer.cs
- AdditionalEntityFunctions.cs
- MessageBox.cs
- Visual3DCollection.cs
- SR.cs
- OutputCacheSettingsSection.cs
- Buffer.cs
- NetworkAddressChange.cs
- DialogBaseForm.cs
- TypeHelpers.cs
- GenericPrincipal.cs
- TemplateApplicationHelper.cs
- TaskScheduler.cs
- ExecutionContext.cs
- CommandValueSerializer.cs
- ReadOnlyCollectionBase.cs
- SchemaObjectWriter.cs
- VoiceObjectToken.cs
- CodeStatementCollection.cs
- CollectionType.cs
- Unit.cs
- PropertyConverter.cs
- WebPartConnectionsCancelEventArgs.cs
- XmlValidatingReaderImpl.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- WebPartTransformer.cs
- SyndicationDeserializer.cs
- PackWebRequestFactory.cs
- Helper.cs
- TransformDescriptor.cs
- XmlBoundElement.cs
- SvcMapFileSerializer.cs
- HexParser.cs
- DocumentAutomationPeer.cs
- CollectionMarkupSerializer.cs
- ChtmlLinkAdapter.cs
- ControlValuePropertyAttribute.cs
- HostingMessageProperty.cs
- BufferedGraphicsManager.cs
- _SingleItemRequestCache.cs
- SmiEventSink_Default.cs
- HttpClientChannel.cs
- WaitHandleCannotBeOpenedException.cs
- Point.cs
- QueryCacheEntry.cs
- __Error.cs
- ObjectQueryExecutionPlan.cs
- DataBinding.cs
- GroupBox.cs
- WebPartRestoreVerb.cs
- SafeTimerHandle.cs
- WebRequest.cs
- ItemCollection.cs
- BuilderInfo.cs
- CodeSubDirectoriesCollection.cs
- ValidationSummary.cs
- TypeConverterHelper.cs
- Random.cs
- PagerStyle.cs
- FileLogRecord.cs
- DependencyPropertyAttribute.cs
- XmlSchemaSimpleTypeUnion.cs
- TimeSpanStorage.cs