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
- BevelBitmapEffect.cs
- ToolStripRenderer.cs
- PreProcessor.cs
- EmptyTextWriter.cs
- GridEntryCollection.cs
- SafeLibraryHandle.cs
- RefExpr.cs
- XmlArrayItemAttribute.cs
- UserValidatedEventArgs.cs
- Predicate.cs
- BrowserCapabilitiesCodeGenerator.cs
- PeerNameRecord.cs
- PersistChildrenAttribute.cs
- DetailsViewInsertedEventArgs.cs
- MulticastIPAddressInformationCollection.cs
- ToolStripOverflow.cs
- RuntimeTrackingProfile.cs
- RemoteCryptoSignHashRequest.cs
- StyleModeStack.cs
- Message.cs
- XmlAttribute.cs
- StandardToolWindows.cs
- WebPartCloseVerb.cs
- M3DUtil.cs
- EntityRecordInfo.cs
- ControlValuePropertyAttribute.cs
- Pens.cs
- StringExpressionSet.cs
- SortAction.cs
- __ConsoleStream.cs
- XmlParserContext.cs
- DomainConstraint.cs
- RangeBase.cs
- PrintPreviewControl.cs
- XpsStructure.cs
- SecureEnvironment.cs
- ScrollContentPresenter.cs
- BufferedStream.cs
- CssClassPropertyAttribute.cs
- PageParser.cs
- Command.cs
- PriorityChain.cs
- ResourceWriter.cs
- MediaCommands.cs
- DoubleAnimation.cs
- RelatedView.cs
- InkCanvas.cs
- Version.cs
- EventListener.cs
- validationstate.cs
- ResXResourceReader.cs
- TypeConverterAttribute.cs
- MouseGestureConverter.cs
- ThumbAutomationPeer.cs
- FixedPageAutomationPeer.cs
- XmlSchemaImporter.cs
- ObjectNotFoundException.cs
- ListBoxChrome.cs
- DataGridAutoFormat.cs
- AbstractSvcMapFileLoader.cs
- ProcessHostConfigUtils.cs
- TimeSpanValidator.cs
- HMACSHA1.cs
- BuildProvider.cs
- MediaTimeline.cs
- PixelShader.cs
- ContextMenu.cs
- XmlCollation.cs
- OfTypeExpression.cs
- CompilationLock.cs
- Byte.cs
- DataGridPagerStyle.cs
- MultiBinding.cs
- EntitySqlQueryCacheKey.cs
- MethodSignatureGenerator.cs
- EdmProperty.cs
- Not.cs
- AuthenticationConfig.cs
- HyperLinkColumn.cs
- ScrollableControl.cs
- Bold.cs
- ReferencedCategoriesDocument.cs
- wmiprovider.cs
- InfoCardMasterKey.cs
- OleStrCAMarshaler.cs
- OperationContext.cs
- WindowsFormsSynchronizationContext.cs
- SelectionHighlightInfo.cs
- KeyValuePairs.cs
- CommonDialog.cs
- FrameworkTemplate.cs
- NetStream.cs
- RadioButtonRenderer.cs
- AttributeCollection.cs
- CompareInfo.cs
- WSDualHttpBindingCollectionElement.cs
- Common.cs
- FileNotFoundException.cs
- DataGridPageChangedEventArgs.cs
- TabPanel.cs