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
- SoapExtensionTypeElement.cs
- DbConnectionPoolGroupProviderInfo.cs
- ExceptionHandlerDesigner.cs
- BaseTemplateCodeDomTreeGenerator.cs
- FileClassifier.cs
- AsyncStreamReader.cs
- TagPrefixInfo.cs
- JavaScriptObjectDeserializer.cs
- AppDomainFactory.cs
- RealizationContext.cs
- AudioDeviceOut.cs
- SymmetricKeyWrap.cs
- ProbeMatchesMessageCD1.cs
- ReferencedAssembly.cs
- BinaryObjectWriter.cs
- CompModSwitches.cs
- TextContainer.cs
- DataGridBoolColumn.cs
- PasswordTextContainer.cs
- PersonalizationProviderCollection.cs
- HiddenFieldPageStatePersister.cs
- WebPartZoneCollection.cs
- SymLanguageType.cs
- ButtonField.cs
- DifferencingCollection.cs
- InvalidPropValue.cs
- LayoutTable.cs
- InkSerializer.cs
- BrowserCapabilitiesCodeGenerator.cs
- WriteFileContext.cs
- ColumnMapTranslator.cs
- ContextInformation.cs
- LineUtil.cs
- DependentList.cs
- PolicyVersion.cs
- HashCodeCombiner.cs
- ApplyTemplatesAction.cs
- LambdaCompiler.Statements.cs
- SqlCacheDependencyDatabase.cs
- ASCIIEncoding.cs
- BindableAttribute.cs
- XsdBuilder.cs
- SerialPort.cs
- cookieexception.cs
- CodeValidator.cs
- CodeGeneratorOptions.cs
- ModelPropertyDescriptor.cs
- EntityDataSourceMemberPath.cs
- ThousandthOfEmRealDoubles.cs
- PersonalizationProviderHelper.cs
- BindingExpression.cs
- GenericPrincipal.cs
- PaintValueEventArgs.cs
- SafeRightsManagementSessionHandle.cs
- TraceSection.cs
- Popup.cs
- Decoder.cs
- AssemblyAssociatedContentFileAttribute.cs
- MouseCaptureWithinProperty.cs
- ScrollPattern.cs
- DistributedTransactionPermission.cs
- CqlBlock.cs
- IIS7UserPrincipal.cs
- BrowserDefinition.cs
- EntityParameterCollection.cs
- EventLogPermissionEntryCollection.cs
- DataControlFieldTypeEditor.cs
- BinaryObjectInfo.cs
- ApplicationSettingsBase.cs
- NavigationCommands.cs
- X509Certificate2Collection.cs
- MenuItemCollectionEditorDialog.cs
- ReversePositionQuery.cs
- Pkcs7Signer.cs
- PrintController.cs
- ZipIOModeEnforcingStream.cs
- FunctionCommandText.cs
- entityreference_tresulttype.cs
- DmlSqlGenerator.cs
- MonitoringDescriptionAttribute.cs
- RichTextBox.cs
- ItemPager.cs
- DiscoveryDocumentLinksPattern.cs
- SystemWebSectionGroup.cs
- HiddenField.cs
- OleDbStruct.cs
- RemoteX509AsymmetricSecurityKey.cs
- PowerStatus.cs
- SimpleWebHandlerParser.cs
- ThousandthOfEmRealDoubles.cs
- GuidConverter.cs
- PropertyGridCommands.cs
- ResourceManagerWrapper.cs
- InputProviderSite.cs
- Type.cs
- PrimitiveRenderer.cs
- XPathBinder.cs
- ExpandCollapsePattern.cs
- LateBoundBitmapDecoder.cs
- TableLayoutStyle.cs