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
- DetailsViewPagerRow.cs
- SchemaImporterExtensionsSection.cs
- ScrollData.cs
- SecurityUtils.cs
- ReadOnlyDictionary.cs
- ChangeBlockUndoRecord.cs
- DataSetFieldSchema.cs
- ACL.cs
- TextDecoration.cs
- PasswordDeriveBytes.cs
- ImageKeyConverter.cs
- UiaCoreTypesApi.cs
- BaseTemplateCodeDomTreeGenerator.cs
- METAHEADER.cs
- ComEventsHelper.cs
- StrongNameMembershipCondition.cs
- DefaultAsyncDataDispatcher.cs
- XmlImplementation.cs
- ProfileBuildProvider.cs
- StringFormat.cs
- OptimalBreakSession.cs
- WinCategoryAttribute.cs
- TreeWalker.cs
- __TransparentProxy.cs
- Site.cs
- DynamicField.cs
- TransportSecurityProtocol.cs
- VBIdentifierTrimConverter.cs
- TableItemPatternIdentifiers.cs
- Operand.cs
- InvalidFilterCriteriaException.cs
- ZeroOpNode.cs
- MouseActionConverter.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- ViewKeyConstraint.cs
- CipherData.cs
- ElementAction.cs
- TemplatedControlDesigner.cs
- FocusWithinProperty.cs
- XDeferredAxisSource.cs
- PropertyGridView.cs
- ToolBarButton.cs
- ParamArrayAttribute.cs
- BaseEntityWrapper.cs
- PointCollection.cs
- TransactionState.cs
- PasswordTextNavigator.cs
- Viewport3DAutomationPeer.cs
- BaseCollection.cs
- DataGridComponentEditor.cs
- FixedElement.cs
- OracleDataAdapter.cs
- BridgeDataReader.cs
- ActiveXHelper.cs
- DesignRelation.cs
- UIElementHelper.cs
- Command.cs
- EnterpriseServicesHelper.cs
- ToolStripItemRenderEventArgs.cs
- MessageOperationFormatter.cs
- Certificate.cs
- SystemFonts.cs
- ExpressionDumper.cs
- DigestTraceRecordHelper.cs
- Configuration.cs
- KeyGesture.cs
- DataDocumentXPathNavigator.cs
- RequestCache.cs
- VisualCollection.cs
- ClientBuildManagerCallback.cs
- CodeDomLocalizationProvider.cs
- SafeEventLogWriteHandle.cs
- TargetFrameworkUtil.cs
- QilTernary.cs
- SHA512CryptoServiceProvider.cs
- ExpressionVisitor.cs
- StateDesigner.Layouts.cs
- SqlProviderUtilities.cs
- DataSourceCache.cs
- SafeFileMappingHandle.cs
- StandardCommands.cs
- QuadraticBezierSegment.cs
- PartialTrustVisibleAssembly.cs
- DataPagerFieldCollection.cs
- GPRECT.cs
- DateTimeValueSerializerContext.cs
- DataStorage.cs
- RuleSettings.cs
- MouseOverProperty.cs
- Underline.cs
- ListParagraph.cs
- PassportIdentity.cs
- CultureInfo.cs
- DisposableCollectionWrapper.cs
- ArrayItemReference.cs
- EventArgs.cs
- ColumnMapVisitor.cs
- NotifyInputEventArgs.cs
- SolidBrush.cs
- PropertyMappingExceptionEventArgs.cs