Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / MS / Internal / ComponentModel / PropertyKey.cs / 1305600 / 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
- UnicastIPAddressInformationCollection.cs
- MultiPageTextView.cs
- DataMisalignedException.cs
- TailCallAnalyzer.cs
- WindowsHyperlink.cs
- XmlElementAttributes.cs
- GridSplitterAutomationPeer.cs
- CryptoStream.cs
- EUCJPEncoding.cs
- CodeTypeConstructor.cs
- Events.cs
- SecurityElement.cs
- AddInAttribute.cs
- cache.cs
- MenuItemCollectionEditor.cs
- ZipIOLocalFileHeader.cs
- GraphicsContext.cs
- TrackBarRenderer.cs
- UnsafeMethods.cs
- BasicExpandProvider.cs
- TrackingProvider.cs
- ExpandableObjectConverter.cs
- SiteMapNodeItem.cs
- XmlTextReaderImpl.cs
- Perspective.cs
- SqlTopReducer.cs
- ButtonField.cs
- GeneralTransform2DTo3DTo2D.cs
- HtmlControlPersistable.cs
- OdbcCommand.cs
- Convert.cs
- EntityDataSourceEntityTypeFilterItem.cs
- ArrayList.cs
- ScalarOps.cs
- PersianCalendar.cs
- TrustLevelCollection.cs
- XmlAttributeCollection.cs
- WebZone.cs
- DotExpr.cs
- TextBreakpoint.cs
- InternalBase.cs
- TextStore.cs
- XPathException.cs
- WmlValidatorAdapter.cs
- ExpressionNormalizer.cs
- PrintPreviewControl.cs
- WebEventTraceProvider.cs
- WindowsSspiNegotiation.cs
- TimeStampChecker.cs
- InfoCardMasterKey.cs
- XmlDataSourceNodeDescriptor.cs
- TextCharacters.cs
- MenuItem.cs
- AsymmetricSignatureDeformatter.cs
- SystemTcpConnection.cs
- BindingEditor.xaml.cs
- XmlWriter.cs
- TableLayoutStyleCollection.cs
- TypeInformation.cs
- SimpleHandlerFactory.cs
- GlyphsSerializer.cs
- StreamResourceInfo.cs
- InvalidDocumentContentsException.cs
- MultipartContentParser.cs
- DynamicControl.cs
- EntityDataSourceQueryBuilder.cs
- TriggerCollection.cs
- DataGridViewRowsRemovedEventArgs.cs
- SqlDataRecord.cs
- ConsumerConnectionPointCollection.cs
- ClaimTypes.cs
- FormsAuthenticationCredentials.cs
- ShaderEffect.cs
- XmlCharCheckingWriter.cs
- HostingEnvironmentWrapper.cs
- SmuggledIUnknown.cs
- ImageCodecInfoPrivate.cs
- FillErrorEventArgs.cs
- PingOptions.cs
- SafeNativeMemoryHandle.cs
- Brushes.cs
- AuthenticationModulesSection.cs
- BindingManagerDataErrorEventArgs.cs
- ResXBuildProvider.cs
- ReleaseInstanceMode.cs
- SemanticResultValue.cs
- UnsafeNativeMethodsMilCoreApi.cs
- NativeMethods.cs
- NativeCompoundFileAPIs.cs
- AutomationPropertyInfo.cs
- XmlSchemaValidator.cs
- SafeNativeMethods.cs
- ActivityExecutorSurrogate.cs
- SyntaxCheck.cs
- DataGridViewSelectedColumnCollection.cs
- ReachFixedPageSerializer.cs
- XomlCompiler.cs
- FormViewRow.cs
- HttpWriter.cs
- PageCatalogPart.cs