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
- SqlComparer.cs
- SiteMap.cs
- TextBoxView.cs
- IteratorAsyncResult.cs
- SingleKeyFrameCollection.cs
- StyleTypedPropertyAttribute.cs
- OleDbCommand.cs
- ServicePointManagerElement.cs
- Highlights.cs
- Menu.cs
- ToolStripItemClickedEventArgs.cs
- AuthenticateEventArgs.cs
- DeferredTextReference.cs
- CodePageEncoding.cs
- Annotation.cs
- ClonableStack.cs
- XPathNavigatorKeyComparer.cs
- RemotingConfigParser.cs
- ListView.cs
- ViewStateException.cs
- CheckedListBox.cs
- MenuEventArgs.cs
- SiteMapDataSource.cs
- NameNode.cs
- DateTimeOffset.cs
- DataGridItemEventArgs.cs
- LinkedList.cs
- BitStream.cs
- ValidationPropertyAttribute.cs
- DataGridViewRowPrePaintEventArgs.cs
- MdbDataFileEditor.cs
- OperationInfo.cs
- baseaxisquery.cs
- EntityException.cs
- NullRuntimeConfig.cs
- ObfuscateAssemblyAttribute.cs
- PropertyDescriptors.cs
- ObjectConverter.cs
- SafeFileMapViewHandle.cs
- _WinHttpWebProxyDataBuilder.cs
- DoubleAnimation.cs
- EventTask.cs
- ValidationErrorEventArgs.cs
- PresentationTraceSources.cs
- ObjectFullSpanRewriter.cs
- LinkTarget.cs
- ArraySubsetEnumerator.cs
- XmlILConstructAnalyzer.cs
- ListViewGroupConverter.cs
- MarshalByValueComponent.cs
- BulletChrome.cs
- DLinqDataModelProvider.cs
- Timeline.cs
- RepeatButtonAutomationPeer.cs
- XmlNamedNodeMap.cs
- PreviewPageInfo.cs
- DataControlFieldCollection.cs
- DbDataReader.cs
- ItemCollection.cs
- VisualBasicHelper.cs
- ObjectTypeMapping.cs
- AnimationLayer.cs
- Drawing.cs
- SectionInput.cs
- RelationshipEnd.cs
- SID.cs
- TextTreeExtractElementUndoUnit.cs
- CodeDOMUtility.cs
- WebGetAttribute.cs
- MetadataCacheItem.cs
- MdImport.cs
- PageStatePersister.cs
- MimeFormatter.cs
- _CommandStream.cs
- DbFunctionCommandTree.cs
- DrawingAttributes.cs
- MessageSmuggler.cs
- DrawingBrush.cs
- FrugalList.cs
- UnsafeNativeMethodsTablet.cs
- ColorInterpolationModeValidation.cs
- URI.cs
- IisTraceListener.cs
- BamlRecordWriter.cs
- EncryptedKeyIdentifierClause.cs
- FunctionImportMapping.cs
- CodeGroup.cs
- UrlMappingCollection.cs
- SchemaEntity.cs
- ItemChangedEventArgs.cs
- SerializationAttributes.cs
- MetadataPropertyvalue.cs
- ObjectDataSourceStatusEventArgs.cs
- RepeatButtonAutomationPeer.cs
- PersonalizationStateInfoCollection.cs
- ListViewGroupConverter.cs
- ListViewItemCollectionEditor.cs
- DownloadProgressEventArgs.cs
- OleDbSchemaGuid.cs
- _NativeSSPI.cs