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
- MouseOverProperty.cs
- PrinterUnitConvert.cs
- RunClient.cs
- BorderGapMaskConverter.cs
- DbConnectionInternal.cs
- GroupDescription.cs
- XmlAttributes.cs
- Binding.cs
- CustomLineCap.cs
- XPathItem.cs
- EventManager.cs
- ConvertEvent.cs
- SpotLight.cs
- Currency.cs
- OperationGenerator.cs
- FillErrorEventArgs.cs
- ActivityStatusChangeEventArgs.cs
- DataGridViewRowHeaderCell.cs
- DataColumnPropertyDescriptor.cs
- ObjectListShowCommandsEventArgs.cs
- Models.cs
- EntryWrittenEventArgs.cs
- FontWeights.cs
- InlineCollection.cs
- FilterElement.cs
- SafeFileHandle.cs
- SparseMemoryStream.cs
- BrowserCapabilitiesFactory.cs
- ContainerAction.cs
- PageTheme.cs
- ChangeBlockUndoRecord.cs
- KeyGestureConverter.cs
- IPAddressCollection.cs
- EventLogSession.cs
- ResourceExpression.cs
- Control.cs
- ConfigurationFileMap.cs
- ColumnMap.cs
- SelectionProcessor.cs
- OpacityConverter.cs
- PageThemeParser.cs
- TextCompositionManager.cs
- altserialization.cs
- KeyboardEventArgs.cs
- login.cs
- ImmComposition.cs
- SessionPageStateSection.cs
- ApplicationActivator.cs
- RecordBuilder.cs
- SignatureToken.cs
- ISFTagAndGuidCache.cs
- BitmapCacheBrush.cs
- TargetPerspective.cs
- SqlDataRecord.cs
- StrongNameUtility.cs
- FormViewDeleteEventArgs.cs
- ConfigurationStrings.cs
- RegistryKey.cs
- DataGridViewComboBoxEditingControl.cs
- RegistrySecurity.cs
- QueryStringConverter.cs
- CatalogZoneBase.cs
- RawStylusSystemGestureInputReport.cs
- TransferRequestHandler.cs
- StickyNoteHelper.cs
- EnumUnknown.cs
- FtpCachePolicyElement.cs
- DataServiceQueryContinuation.cs
- OracleBFile.cs
- ServiceContractDetailViewControl.cs
- KoreanCalendar.cs
- DelimitedListTraceListener.cs
- Formatter.cs
- ArrayElementGridEntry.cs
- Run.cs
- ContextDataSourceView.cs
- SerialPort.cs
- StrongNameMembershipCondition.cs
- ConstructorNeedsTagAttribute.cs
- ToolboxComponentsCreatedEventArgs.cs
- FrameDimension.cs
- InputDevice.cs
- ControlEvent.cs
- BoundsDrawingContextWalker.cs
- GZipDecoder.cs
- MessageSecurityOverHttpElement.cs
- DataRelation.cs
- BaseCodeDomTreeGenerator.cs
- AssociationSetMetadata.cs
- Vars.cs
- ElapsedEventArgs.cs
- PseudoWebRequest.cs
- Accessible.cs
- RewritingSimplifier.cs
- ItemChangedEventArgs.cs
- CryptoProvider.cs
- Application.cs
- ChameleonKey.cs
- TrustLevel.cs
- DataColumnCollection.cs