Exemple #1
0
        public List <IObjectInfo> GetReferences()
        {
            PropertiesFingerprint fingerprint = this.fingerprint as PropertiesFingerprint;

            if (fingerprint != null)
            {
                return(fingerprint.GetReferences());
            }

            return(new List <IObjectInfo>());
        }
Exemple #2
0
        protected virtual bool Equals(PropertiesFingerprint root, object obj)
        {
            if (this == obj)
            {
                return(true);
            }

            if (obj == null || !(obj is PropertiesFingerprint))
            {
                return(false);
            }

            PropertiesFingerprint other = obj as PropertiesFingerprint;

            if (this.TypeID != other.TypeID || this.PropertyHash != other.PropertyHash || this.pptrs.Count != other.pptrs.Count)
            {
                return(false);
            }

            var summaries      = this.GetReferences();
            var otherSummaries = other.GetReferences();

            for (int i = 0; i < summaries.Count; i++)
            {
                var f1 = summaries[i].Fingerprint;
                var f2 = otherSummaries[i].Fingerprint;

                if (f1 is PropertiesFingerprint)
                {
                    if (f1 == root)
                    {
                        continue;
                    }

                    if (!(f1 as PropertiesFingerprint).Equals(root, f2))
                    {
                        return(false);
                    }
                }
                else
                {
                    if (!f1.Equals(f2))
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }