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
- BinHexEncoder.cs
- TerminateSequence.cs
- ClipboardData.cs
- ObjectStorage.cs
- EventRecordWrittenEventArgs.cs
- AssemblySettingAttributes.cs
- TextShapeableCharacters.cs
- MimePart.cs
- XsdBuilder.cs
- AutoScrollExpandMessageFilter.cs
- BulletedListEventArgs.cs
- HtmlTableRowCollection.cs
- DesignerSerializerAttribute.cs
- Transform.cs
- HighlightComponent.cs
- CompressedStack.cs
- Int32.cs
- AuthorizationSection.cs
- TextAdaptor.cs
- EncryptedKeyHashIdentifierClause.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- AsymmetricKeyExchangeDeformatter.cs
- CommonObjectSecurity.cs
- MessageQueueEnumerator.cs
- XsltLoader.cs
- HMACSHA1.cs
- WithParamAction.cs
- BitmapEffectRenderDataResource.cs
- DecimalKeyFrameCollection.cs
- SspiWrapper.cs
- IIS7UserPrincipal.cs
- BrowsableAttribute.cs
- RSAPKCS1SignatureDeformatter.cs
- OleDbInfoMessageEvent.cs
- AtomParser.cs
- ContextBase.cs
- EdmRelationshipRoleAttribute.cs
- GridViewColumnCollection.cs
- SocketPermission.cs
- GlyphRun.cs
- DataPager.cs
- Options.cs
- GrammarBuilderBase.cs
- XmlWriterSettings.cs
- Schema.cs
- FontDriver.cs
- AnnouncementSendsAsyncResult.cs
- CompoundFileReference.cs
- WebPartCloseVerb.cs
- ExpressionPrinter.cs
- PrePostDescendentsWalker.cs
- SoapAttributeOverrides.cs
- RepeaterItemCollection.cs
- PointConverter.cs
- SourceChangedEventArgs.cs
- AccessorTable.cs
- ReadOnlyHierarchicalDataSourceView.cs
- ParsedAttributeCollection.cs
- Interlocked.cs
- QueryableFilterRepeater.cs
- HtmlInputButton.cs
- _DigestClient.cs
- Delay.cs
- OrthographicCamera.cs
- TreeViewDataItemAutomationPeer.cs
- RequestedSignatureDialog.cs
- InvalidCastException.cs
- OrthographicCamera.cs
- SizeAnimation.cs
- IOThreadTimer.cs
- GZipStream.cs
- BackStopAuthenticationModule.cs
- sqlmetadatafactory.cs
- EventMappingSettings.cs
- LicenseProviderAttribute.cs
- FixUp.cs
- ToolStripDropDownItem.cs
- cookie.cs
- QueryStack.cs
- GcSettings.cs
- TrackBar.cs
- BindingExpressionBase.cs
- TreeNode.cs
- WithStatement.cs
- PageCodeDomTreeGenerator.cs
- IssuerInformation.cs
- MeasureItemEvent.cs
- MultiView.cs
- SiteMapNodeCollection.cs
- ListItemConverter.cs
- RowToParametersTransformer.cs
- OuterGlowBitmapEffect.cs
- AnnotationService.cs
- IBuiltInEvidence.cs
- ObjectToIdCache.cs
- CompositeTypefaceMetrics.cs
- HostElement.cs
- ConnectionManagementElementCollection.cs
- WorkBatch.cs
- DefaultEventAttribute.cs