示例#1
0
        public override bool Equals(object obj)
        {
            HierarchyIdentity identity = obj as HierarchyIdentity;

            if (identity == null)
            {
                return(false);
            }
            return(ComUtilities.IsSameComObject(this.Hierarchy, identity.Hierarchy));
        }
示例#2
0
        public override bool Equals(object obj)
        {
            HierarchyItemPair pair = obj as HierarchyItemPair;

            if (pair == null)
            {
                return(false);
            }
            return(ComUtilities.IsSameComObject(this.Hierarchy, pair.Hierarchy) && (this.ItemID == pair.ItemID));
        }
示例#3
0
        public override int GetHashCode()
        {
            int    num;
            IntPtr pUnk = ComUtilities.QueryInterfaceIUnknown(this.Hierarchy);

            try
            {
                num = pUnk.ToInt32();
            }
            finally
            {
                if (pUnk != IntPtr.Zero)
                {
                    Marshal.Release(pUnk);
                }
            }
            return(num);
        }