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
- SQLSingleStorage.cs
- ErrorsHelper.cs
- Char.cs
- SoapEnumAttribute.cs
- DragEvent.cs
- DataGridViewColumn.cs
- FolderLevelBuildProviderCollection.cs
- ResXDataNode.cs
- BufferAllocator.cs
- XmlNullResolver.cs
- ExpressionEditorAttribute.cs
- SchemaManager.cs
- DesignerRegion.cs
- PrinterSettings.cs
- SecurityTokenSerializer.cs
- ScriptDescriptor.cs
- InternalConfigRoot.cs
- VersionedStream.cs
- RtfNavigator.cs
- CodeTypeDeclarationCollection.cs
- FileVersionInfo.cs
- CodeTypeParameterCollection.cs
- VisualStyleRenderer.cs
- OutputCacheProfileCollection.cs
- SelectionUIService.cs
- ProxyFragment.cs
- Activity.cs
- ObjectListDesigner.cs
- OdbcParameterCollection.cs
- OdbcDataReader.cs
- TreeNodeBindingCollection.cs
- PageAsyncTask.cs
- EdmConstants.cs
- PipeStream.cs
- AddInAttribute.cs
- SyndicationDeserializer.cs
- LinqDataView.cs
- TextEditorThreadLocalStore.cs
- ScriptComponentDescriptor.cs
- PageContentAsyncResult.cs
- ToolStripControlHost.cs
- ReadOnlyDataSourceView.cs
- DoubleUtil.cs
- RefreshPropertiesAttribute.cs
- PersonalizablePropertyEntry.cs
- Transform.cs
- MarkedHighlightComponent.cs
- ProfileGroupSettingsCollection.cs
- LockedActivityGlyph.cs
- ThreadStartException.cs
- BindingManagerDataErrorEventArgs.cs
- IgnoreSectionHandler.cs
- ImpersonateTokenRef.cs
- Perspective.cs
- ObjectTag.cs
- SubstitutionList.cs
- UnsafeNativeMethods.cs
- PkcsMisc.cs
- WindowsAuthenticationEventArgs.cs
- MessageQueueInstaller.cs
- ChannelServices.cs
- AssertHelper.cs
- TrackingMemoryStreamFactory.cs
- NavigatorOutput.cs
- DispatchWrapper.cs
- SqlCachedBuffer.cs
- MessageQuerySet.cs
- CompositeTypefaceMetrics.cs
- ClaimTypes.cs
- MemberInfoSerializationHolder.cs
- FlowDocumentReaderAutomationPeer.cs
- SqlStream.cs
- CopyNodeSetAction.cs
- DCSafeHandle.cs
- HelpProvider.cs
- EventLogEntryCollection.cs
- HtmlTitle.cs
- FileStream.cs
- EncodingTable.cs
- InvalidProgramException.cs
- ExtensionsSection.cs
- InputScopeConverter.cs
- XXXInfos.cs
- SemanticValue.cs
- ProfileGroupSettings.cs
- CallbackValidatorAttribute.cs
- COM2ExtendedBrowsingHandler.cs
- URLString.cs
- COM2ExtendedBrowsingHandler.cs
- AutomationTextAttribute.cs
- PasswordRecovery.cs
- WmiInstallComponent.cs
- FixedSOMSemanticBox.cs
- ReleaseInstanceMode.cs
- cookiecollection.cs
- MissingMethodException.cs
- NameNode.cs
- PrivilegeNotHeldException.cs
- Operand.cs
- WebResourceAttribute.cs