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
- Size3DConverter.cs
- UDPClient.cs
- MembershipPasswordException.cs
- IIS7WorkerRequest.cs
- PKCS1MaskGenerationMethod.cs
- Calendar.cs
- DrawingState.cs
- DynamicPropertyReader.cs
- PaperSize.cs
- FilteredAttributeCollection.cs
- UseAttributeSetsAction.cs
- JoinTreeSlot.cs
- ContentElementAutomationPeer.cs
- DetailsViewUpdatedEventArgs.cs
- TableHeaderCell.cs
- ScrollProviderWrapper.cs
- CapabilitiesUse.cs
- DetailsViewDeletedEventArgs.cs
- RewritingSimplifier.cs
- CallContext.cs
- HwndHost.cs
- EntityTypeEmitter.cs
- BindingContext.cs
- Ticks.cs
- FileSystemEventArgs.cs
- TypeElementCollection.cs
- SafeBitVector32.cs
- DatagridviewDisplayedBandsData.cs
- KeyFrames.cs
- Rijndael.cs
- ConnectionStringsExpressionBuilder.cs
- BmpBitmapDecoder.cs
- TraceInternal.cs
- Repeater.cs
- X509AudioLogo.cs
- FilterableAttribute.cs
- rsa.cs
- DictionaryEditChange.cs
- DNS.cs
- Schema.cs
- TrackingQuery.cs
- DocumentsTrace.cs
- DefaultWorkflowSchedulerService.cs
- ProxyHwnd.cs
- TypeExtensionConverter.cs
- SurrogateSelector.cs
- MessageQueuePermission.cs
- SqlDependencyUtils.cs
- _NegotiateClient.cs
- ToolStripItemCollection.cs
- QueryConverter.cs
- Attributes.cs
- HtmlTitle.cs
- OracleLob.cs
- NativeMethods.cs
- ObjectHandle.cs
- _HeaderInfoTable.cs
- FormatterServices.cs
- X509AsymmetricSecurityKey.cs
- StrokeDescriptor.cs
- CompositeDataBoundControl.cs
- Inflater.cs
- ViewLoader.cs
- ObjectDataSource.cs
- RepeatEnumerable.cs
- AssociationSet.cs
- EdgeModeValidation.cs
- WrappedKeySecurityTokenParameters.cs
- HostingEnvironmentSection.cs
- GregorianCalendarHelper.cs
- CultureInfoConverter.cs
- ListBindableAttribute.cs
- HelpKeywordAttribute.cs
- LicFileLicenseProvider.cs
- QueryOperationResponseOfT.cs
- PrintDocument.cs
- UpdateException.cs
- AssemblyNameProxy.cs
- QueryParameter.cs
- InputElement.cs
- PageFunction.cs
- ScrollItemPattern.cs
- XmlDictionaryReader.cs
- TextEditorSpelling.cs
- TabPageDesigner.cs
- ListControl.cs
- ListViewUpdatedEventArgs.cs
- NotSupportedException.cs
- SelectionEditingBehavior.cs
- HashCodeCombiner.cs
- AsyncOperation.cs
- DisplayMemberTemplateSelector.cs
- RuleInfoComparer.cs
- HMACMD5.cs
- LessThan.cs
- RequestQueue.cs
- XmlCDATASection.cs
- DispatcherFrame.cs
- TextLineBreak.cs
- BaseContextMenu.cs