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
- PeerContact.cs
- Subtract.cs
- CodeDomConfigurationHandler.cs
- CollectionChangedEventManager.cs
- XmlException.cs
- Int32CollectionConverter.cs
- HwndSourceParameters.cs
- Array.cs
- OdbcException.cs
- MembershipSection.cs
- TraceLevelHelper.cs
- DetailsViewUpdatedEventArgs.cs
- IPHostEntry.cs
- WriteLine.cs
- Stylus.cs
- ZipPackage.cs
- MdImport.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- Converter.cs
- FindProgressChangedEventArgs.cs
- PrivateFontCollection.cs
- XmlQueryType.cs
- VersionedStreamOwner.cs
- BindUriHelper.cs
- RepeaterItemEventArgs.cs
- FileDialog.cs
- PropertyNames.cs
- _HelperAsyncResults.cs
- ApplicationSecurityInfo.cs
- RuntimeHelpers.cs
- ToolStripLocationCancelEventArgs.cs
- QuaternionRotation3D.cs
- MetadataUtilsSmi.cs
- VirtualPath.cs
- LinqDataSourceEditData.cs
- ParameterExpression.cs
- IsolatedStorage.cs
- InvokePattern.cs
- hebrewshape.cs
- __TransparentProxy.cs
- GradientStop.cs
- Point3DConverter.cs
- TextEndOfParagraph.cs
- ObjectIDGenerator.cs
- DotExpr.cs
- GestureRecognitionResult.cs
- RepeaterItemEventArgs.cs
- X500Name.cs
- _Rfc2616CacheValidators.cs
- SafeMarshalContext.cs
- AmbientEnvironment.cs
- RuleRef.cs
- SimpleApplicationHost.cs
- Point4D.cs
- ApplyHostConfigurationBehavior.cs
- QilGenerator.cs
- TcpAppDomainProtocolHandler.cs
- DataRowCollection.cs
- IndentedWriter.cs
- InteropAutomationProvider.cs
- ParentQuery.cs
- DataGridCellItemAutomationPeer.cs
- PhotoPrintingIntent.cs
- _ContextAwareResult.cs
- Int16AnimationBase.cs
- securitycriticaldata.cs
- ClientUrlResolverWrapper.cs
- XmlCDATASection.cs
- Pointer.cs
- SerializationUtilities.cs
- NumberFormatter.cs
- TextEditorMouse.cs
- IdentityNotMappedException.cs
- AddInProcess.cs
- WorkflowItemPresenter.cs
- ProfileService.cs
- EntityDataReader.cs
- SizeConverter.cs
- AlphabeticalEnumConverter.cs
- AssemblyCollection.cs
- SymLanguageVendor.cs
- Persist.cs
- TCPClient.cs
- StructuralComparisons.cs
- Wildcard.cs
- Span.cs
- TextEditorCharacters.cs
- DetailsViewActionList.cs
- SynchronizationFilter.cs
- SafeHandles.cs
- UdpContractFilterBehavior.cs
- EllipseGeometry.cs
- RSAPKCS1KeyExchangeFormatter.cs
- Memoizer.cs
- DataSourceHelper.cs
- Roles.cs
- ProfileInfo.cs
- MessageSmuggler.cs
- pingexception.cs
- CopyNodeSetAction.cs