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
- PolyLineSegmentFigureLogic.cs
- SequenceFullException.cs
- clipboard.cs
- Scene3D.cs
- XmlSignatureManifest.cs
- AtomicFile.cs
- ISO2022Encoding.cs
- ComplexType.cs
- WindowHideOrCloseTracker.cs
- XmlCustomFormatter.cs
- Transform3D.cs
- EpmSourceTree.cs
- SrgsElementFactoryCompiler.cs
- ClipboardProcessor.cs
- Parser.cs
- ProfilePropertySettingsCollection.cs
- ChildrenQuery.cs
- CodeDirectionExpression.cs
- GradientBrush.cs
- ValidationException.cs
- ConstraintStruct.cs
- BoundPropertyEntry.cs
- ParameterBuilder.cs
- ContextDataSourceContextData.cs
- EditingMode.cs
- CookielessHelper.cs
- SafeThreadHandle.cs
- StructuralObject.cs
- RootDesignerSerializerAttribute.cs
- WindowsEditBoxRange.cs
- PolyBezierSegment.cs
- CodeCommentStatement.cs
- ReplyChannelBinder.cs
- AdornerHitTestResult.cs
- XmlWhitespace.cs
- XamlDesignerSerializationManager.cs
- BitmapImage.cs
- LayoutTable.cs
- TypeForwardedToAttribute.cs
- InvariantComparer.cs
- ProtocolsSection.cs
- CodeParameterDeclarationExpression.cs
- CrossAppDomainChannel.cs
- XamlToRtfWriter.cs
- StreamSecurityUpgradeInitiatorBase.cs
- Constraint.cs
- AsmxEndpointPickerExtension.cs
- CodeCommentStatement.cs
- JavascriptCallbackMessageInspector.cs
- StatusBar.cs
- LayoutEvent.cs
- BrushConverter.cs
- WorkflowInstance.cs
- UncommonField.cs
- ValueTable.cs
- OleDbEnumerator.cs
- ToolboxItemFilterAttribute.cs
- MsmqIntegrationChannelFactory.cs
- EntityDataSourceConfigureObjectContext.cs
- SQLDecimal.cs
- Int32AnimationBase.cs
- ReadOnlyNameValueCollection.cs
- TablePatternIdentifiers.cs
- BaseCodePageEncoding.cs
- Int32AnimationUsingKeyFrames.cs
- SmtpSection.cs
- ConditionalExpression.cs
- XsltConvert.cs
- ViewEvent.cs
- contentDescriptor.cs
- DashStyles.cs
- TraceContextRecord.cs
- StyleXamlTreeBuilder.cs
- IApplicationTrustManager.cs
- DataGridViewTextBoxColumn.cs
- TypeSemantics.cs
- ObjectStateEntryDbDataRecord.cs
- HttpResponseHeader.cs
- ProfessionalColors.cs
- LinkAreaEditor.cs
- WindowsFormsSynchronizationContext.cs
- Util.cs
- ConsoleTraceListener.cs
- XmlDsigSep2000.cs
- EntityModelSchemaGenerator.cs
- HtmlTableRow.cs
- StrokeNodeOperations.cs
- StatusBarPanel.cs
- Label.cs
- WsatConfiguration.cs
- ContainerParagraph.cs
- JoinSymbol.cs
- ExecutedRoutedEventArgs.cs
- RuleSettings.cs
- CollectionContainer.cs
- StyleModeStack.cs
- ComPlusSynchronizationContext.cs
- HMAC.cs
- Size3DValueSerializer.cs
- CollectionBase.cs