Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Base / MS / Internal / ComponentModel / PropertyKey.cs / 1 / PropertyKey.cs
namespace MS.Internal.ComponentModel { using System; using System.Collections.Generic; using System.Windows; // This structure is used as a key in a dictionary of property key -> property descriptor // The key is unique based on the type the property is attached to, and the property // itself. internal struct PropertyKey : IEquatable{ internal PropertyKey(Type attachedType, DependencyProperty prop) { DependencyProperty = prop; AttachedType = attachedType; _hashCode = AttachedType.GetHashCode() ^ DependencyProperty.GetHashCode(); } public override int GetHashCode() { return _hashCode; } public override bool Equals(object obj) { return Equals((PropertyKey)obj); } public bool Equals(PropertyKey key) { return (key.AttachedType == AttachedType && key.DependencyProperty == DependencyProperty); } public static bool operator ==(PropertyKey key1, PropertyKey key2) { return (key1.AttachedType == key2.AttachedType && key1.DependencyProperty == key2.DependencyProperty); } public static bool operator !=(PropertyKey key1, PropertyKey key2) { return (key1.AttachedType != key2.AttachedType || key1.DependencyProperty != key2.DependencyProperty); } internal DependencyProperty DependencyProperty; internal Type AttachedType; private int _hashCode; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MbpInfo.cs
- OleDbStruct.cs
- XmlSchemaImporter.cs
- SqlDataSourceStatusEventArgs.cs
- SoapServerMethod.cs
- Timer.cs
- MouseEventArgs.cs
- DataGridRowEventArgs.cs
- FormView.cs
- NameValuePair.cs
- SecurityPermission.cs
- XsltLoader.cs
- CompressEmulationStream.cs
- DataRecordInternal.cs
- QilInvoke.cs
- StringCollectionEditor.cs
- PropertyExpression.cs
- Axis.cs
- EntityCollection.cs
- SpanIndex.cs
- AbandonedMutexException.cs
- MailBnfHelper.cs
- AssociatedControlConverter.cs
- InteropAutomationProvider.cs
- Control.cs
- Span.cs
- ImageFormat.cs
- Buffer.cs
- PropertySegmentSerializer.cs
- GridErrorDlg.cs
- LoginStatusDesigner.cs
- EncryptedXml.cs
- ListSortDescription.cs
- AuthenticationSection.cs
- XmlSchemaCompilationSettings.cs
- XmlIncludeAttribute.cs
- AssociationEndMember.cs
- _AcceptOverlappedAsyncResult.cs
- TextBoxBase.cs
- followingquery.cs
- Funcletizer.cs
- GridViewRowPresenter.cs
- MenuItemStyleCollection.cs
- ResourcesBuildProvider.cs
- ObjectQuery.cs
- SaveFileDialog.cs
- SamlAuthorizationDecisionClaimResource.cs
- _KerberosClient.cs
- OpenFileDialog.cs
- StyleSheet.cs
- CngAlgorithmGroup.cs
- SynthesizerStateChangedEventArgs.cs
- SubpageParagraph.cs
- WebPartZoneAutoFormat.cs
- SoapFault.cs
- Int32Rect.cs
- URIFormatException.cs
- _Events.cs
- CompositeKey.cs
- DispatcherExceptionEventArgs.cs
- RemoteWebConfigurationHostServer.cs
- DataGridParentRows.cs
- XPathQilFactory.cs
- BamlLocalizer.cs
- MenuItem.cs
- PersonalizationStateInfoCollection.cs
- ComponentResourceKeyConverter.cs
- GeometryGroup.cs
- DbDataReader.cs
- MLangCodePageEncoding.cs
- TypeSystem.cs
- SoapInteropTypes.cs
- SmtpFailedRecipientException.cs
- OleDbErrorCollection.cs
- ViewStateModeByIdAttribute.cs
- PersonalizablePropertyEntry.cs
- SettingsPropertyWrongTypeException.cs
- AssemblyInfo.cs
- EntityDataSourceConfigureObjectContext.cs
- WmlObjectListAdapter.cs
- WeakReadOnlyCollection.cs
- PropertyGrid.cs
- ViewSimplifier.cs
- GAC.cs
- httpstaticobjectscollection.cs
- EpmContentSerializer.cs
- RawTextInputReport.cs
- ContainerVisual.cs
- XmlAttributeCache.cs
- RayMeshGeometry3DHitTestResult.cs
- SimpleHandlerBuildProvider.cs
- SignedInfo.cs
- RichTextBoxDesigner.cs
- FilterElement.cs
- BaseValidator.cs
- NeutralResourcesLanguageAttribute.cs
- FocusChangedEventArgs.cs
- RightsManagementSuppressedStream.cs
- ConfigurationConverterBase.cs
- SiteMapDataSourceView.cs