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
- XmlSchemaSimpleTypeUnion.cs
- DeflateEmulationStream.cs
- RuleValidation.cs
- StateMachineHelpers.cs
- CompilationRelaxations.cs
- ParameterCollection.cs
- ThreadStaticAttribute.cs
- Trigger.cs
- ControlCommandSet.cs
- SqlUtil.cs
- BamlRecordWriter.cs
- DeclaredTypeElement.cs
- HMACSHA384.cs
- EqualityComparer.cs
- CodeFieldReferenceExpression.cs
- SafeThreadHandle.cs
- CodeDomSerializerException.cs
- SecureConversationServiceElement.cs
- AttachedPropertyBrowsableAttribute.cs
- WindowsTokenRoleProvider.cs
- IntegerValidatorAttribute.cs
- LineSegment.cs
- VirtualizingStackPanel.cs
- SplitterPanelDesigner.cs
- CreateUserWizardStep.cs
- ObjectDataSource.cs
- MethodImplAttribute.cs
- CodeVariableDeclarationStatement.cs
- QuadTree.cs
- DBParameter.cs
- HandlerBase.cs
- WinFormsComponentEditor.cs
- ObjectDataSourceStatusEventArgs.cs
- DataDocumentXPathNavigator.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- MsmqIntegrationChannelFactory.cs
- RelationshipDetailsRow.cs
- EventSetter.cs
- Transform.cs
- ReliableMessagingHelpers.cs
- SystemIPInterfaceStatistics.cs
- ModuleConfigurationInfo.cs
- SHA1Managed.cs
- GlobalAclOperationRequirement.cs
- TypedServiceOperationListItem.cs
- RubberbandSelector.cs
- BuildManager.cs
- TcpHostedTransportConfiguration.cs
- CaseInsensitiveHashCodeProvider.cs
- SkinBuilder.cs
- StylusOverProperty.cs
- CodeDirectiveCollection.cs
- Int16.cs
- DesignerResources.cs
- OrCondition.cs
- SystemPens.cs
- ProfilePropertySettingsCollection.cs
- AudioSignalProblemOccurredEventArgs.cs
- Vector3DConverter.cs
- DateTimeFormat.cs
- _TLSstream.cs
- PageCatalogPart.cs
- ValidateNames.cs
- SqlError.cs
- FixedSOMTableRow.cs
- CodeSnippetCompileUnit.cs
- ListViewItem.cs
- XsdDuration.cs
- ProfileSection.cs
- EditingCommands.cs
- QueryOperationResponseOfT.cs
- SchemaNames.cs
- ActiveXHelper.cs
- StorageSetMapping.cs
- RefExpr.cs
- TextBoxAutoCompleteSourceConverter.cs
- FlowDecisionLabelFeature.cs
- CompiledQuery.cs
- ArgumentFixer.cs
- QilTernary.cs
- smtppermission.cs
- ThicknessKeyFrameCollection.cs
- RenameRuleObjectDialog.cs
- TriState.cs
- LogExtent.cs
- ServiceModelExtensionElement.cs
- WindowsFormsSectionHandler.cs
- FormDocumentDesigner.cs
- DoubleKeyFrameCollection.cs
- SupportingTokenBindingElement.cs
- CodeDomComponentSerializationService.cs
- SourceFilter.cs
- PageParserFilter.cs
- SingleTagSectionHandler.cs
- HttpWebResponse.cs
- CorruptingExceptionCommon.cs
- ManipulationDelta.cs
- ContentIterators.cs
- contentDescriptor.cs
- SoapElementAttribute.cs