Ejemplo n.º 1
0
        public override int GetHashCode()
        {
            int hashCode = -1353763451;

            hashCode = hashCode * -1521134295 + Id;
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Description);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Source);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Target);

            hashCode = hashCode * -1521134295 + Conf.GetHashCode();
            hashCode = hashCode * -1521134295 + Integrity.GetHashCode();
            hashCode = hashCode * -1521134295 + Access.GetHashCode();
            return(hashCode);
        }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            var hashCode = 724792092;

            hashCode = hashCode * -1521134295 + IdThreat.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ThreatName);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ThreatDescription);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ThreatSource);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ThreatObject);

            hashCode = hashCode * -1521134295 + Confidentiality.GetHashCode();
            hashCode = hashCode * -1521134295 + Integrity.GetHashCode();
            hashCode = hashCode * -1521134295 + Availability.GetHashCode();
            return(hashCode);
        }
 /// <summary>
 /// Get the hash code for this script.
 /// </summary>
 /// <remarks>The integrity hash will still be unique to the file, even moreso than the address. If the same file gets loaded with SRI hashes from two different sources they'll still be labeled the same file.</remarks>
 /// <returns></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         return(((Src != null ? Src.GetHashCode() : 0) * 397) ^ (Integrity != null ? Integrity.GetHashCode() : 0));
     }
 }