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
- SuppressMessageAttribute.cs
- FolderLevelBuildProvider.cs
- PropertyInformation.cs
- TreeViewItemAutomationPeer.cs
- cookieexception.cs
- ISSmlParser.cs
- UIInitializationException.cs
- RuntimeTransactionHandle.cs
- ToolStripSeparatorRenderEventArgs.cs
- WorkflowTraceTransfer.cs
- UInt64Converter.cs
- PermissionSetTriple.cs
- BindingExpression.cs
- HttpFileCollection.cs
- MenuCommands.cs
- ToolStripDropDownMenu.cs
- XmlAttributeHolder.cs
- Triangle.cs
- SchemaMerger.cs
- CodeGenHelper.cs
- ExceptionValidationRule.cs
- PathGeometry.cs
- OperationCanceledException.cs
- InvalidEnumArgumentException.cs
- HttpProfileBase.cs
- MemoryRecordBuffer.cs
- TypeUnloadedException.cs
- CounterCreationDataCollection.cs
- BufferBuilder.cs
- DesignerCategoryAttribute.cs
- SafeUserTokenHandle.cs
- RequestCacheManager.cs
- Point4DValueSerializer.cs
- BasicExpandProvider.cs
- dtdvalidator.cs
- ComplexType.cs
- parserscommon.cs
- IApplicationTrustManager.cs
- SequenceNumber.cs
- DiscoveryCallbackBehavior.cs
- BamlResourceContent.cs
- CheckBox.cs
- UserControlCodeDomTreeGenerator.cs
- MenuItem.cs
- SessionIDManager.cs
- XamlStyleSerializer.cs
- FontDriver.cs
- TextCharacters.cs
- LastQueryOperator.cs
- TdsRecordBufferSetter.cs
- Wildcard.cs
- Array.cs
- RelationshipWrapper.cs
- SQLBinary.cs
- WebConfigurationHostFileChange.cs
- AnnotationElement.cs
- TargetParameterCountException.cs
- NotifyIcon.cs
- SecurityUtils.cs
- ThousandthOfEmRealPoints.cs
- OutputCacheSection.cs
- AssertSection.cs
- RoleGroupCollectionEditor.cs
- MessageHeaderAttribute.cs
- TranslateTransform.cs
- WebPartsSection.cs
- AtomParser.cs
- followingsibling.cs
- RegisteredScript.cs
- PresentationSource.cs
- BrowserCapabilitiesFactoryBase.cs
- TextProviderWrapper.cs
- MonitoringDescriptionAttribute.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- ObjectDataSourceMethodEventArgs.cs
- BasicExpressionVisitor.cs
- QuaternionValueSerializer.cs
- ObjectDataSourceSelectingEventArgs.cs
- OdbcConnectionHandle.cs
- SqlMethodAttribute.cs
- DataGridViewAdvancedBorderStyle.cs
- XmlSchemaValidationException.cs
- XmlCompatibilityReader.cs
- ActivityUtilities.cs
- RuntimeConfigurationRecord.cs
- Matrix.cs
- PropertyEmitter.cs
- ClientConfigPaths.cs
- FunctionQuery.cs
- CriticalHandle.cs
- TypeElementCollection.cs
- ManipulationDeltaEventArgs.cs
- XhtmlBasicLinkAdapter.cs
- CommandHelpers.cs
- TabletDeviceInfo.cs
- _KerberosClient.cs
- ListChangedEventArgs.cs
- DragAssistanceManager.cs
- TokenBasedSetEnumerator.cs
- PrinterResolution.cs