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
- Matrix3DConverter.cs
- HwndKeyboardInputProvider.cs
- RuleAction.cs
- NativeMethodsOther.cs
- UserPersonalizationStateInfo.cs
- ExtendedProtectionPolicyElement.cs
- ConnectionPoint.cs
- PageContentCollection.cs
- SerialPinChanges.cs
- LineServicesRun.cs
- BaseProcessProtocolHandler.cs
- newinstructionaction.cs
- HttpResponse.cs
- QuerySelectOp.cs
- OleDbDataReader.cs
- ParameterCollectionEditorForm.cs
- MailDefinition.cs
- ConnectionManagementSection.cs
- MyContact.cs
- DataTemplate.cs
- OracleParameterBinding.cs
- LinqToSqlWrapper.cs
- SQLMoney.cs
- URLAttribute.cs
- DSASignatureFormatter.cs
- ModulesEntry.cs
- XamlBuildTaskServices.cs
- ObjectNotFoundException.cs
- TextModifier.cs
- AuthenticationServiceManager.cs
- InstanceDataCollectionCollection.cs
- WindowsStartMenu.cs
- AppDomainManager.cs
- ProgressBarHighlightConverter.cs
- TdsParserStaticMethods.cs
- WorkflowRuntimeEndpoint.cs
- ConnectionConsumerAttribute.cs
- StoreConnection.cs
- PrintDialog.cs
- ColumnMapVisitor.cs
- HttpValueCollection.cs
- BitmapEffectRenderDataResource.cs
- WpfWebRequestHelper.cs
- OneOf.cs
- RowUpdatedEventArgs.cs
- SecurityDescriptor.cs
- NamedObject.cs
- LockedActivityGlyph.cs
- RestHandler.cs
- CompareValidator.cs
- PermissionSet.cs
- AssociationType.cs
- ProvidePropertyAttribute.cs
- CqlGenerator.cs
- AndMessageFilterTable.cs
- OracleConnectionStringBuilder.cs
- HtmlTableRow.cs
- DebugHandleTracker.cs
- StrongNameUtility.cs
- NullReferenceException.cs
- SimpleBitVector32.cs
- RawUIStateInputReport.cs
- DispatcherOperation.cs
- TextSpan.cs
- ActivityCodeDomSerializationManager.cs
- BamlTreeMap.cs
- UiaCoreTypesApi.cs
- IDReferencePropertyAttribute.cs
- UrlMappingsSection.cs
- PointConverter.cs
- DynamicMetaObject.cs
- CrossSiteScriptingValidation.cs
- ParallelLoopState.cs
- InfoCardMetadataExchangeClient.cs
- BitmapEffectInputData.cs
- RepeatButtonAutomationPeer.cs
- StringArrayConverter.cs
- TdsEnums.cs
- ApplicationInterop.cs
- TemplatePagerField.cs
- RectAnimationUsingKeyFrames.cs
- WebBaseEventKeyComparer.cs
- ErrorStyle.cs
- ResizeGrip.cs
- SpeechSynthesizer.cs
- FieldAccessException.cs
- CodeDOMUtility.cs
- CompModSwitches.cs
- LineSegment.cs
- ValidatedControlConverter.cs
- DataPagerFieldCollection.cs
- TemplateField.cs
- TextElementEnumerator.cs
- SelectionEditingBehavior.cs
- WindowsRichEdit.cs
- ClassicBorderDecorator.cs
- DefaultTraceListener.cs
- ConfigXmlCDataSection.cs
- PriorityQueue.cs
- DataStreamFromComStream.cs