示例#1
0
 /// <summary>
 /// Xor of the hash codes of the layer length, datalink, message type, query version, code, identifier, group address and access key.
 /// </summary>
 public override int GetHashCode()
 {
     return(new[]
     {
         base.GetHashCode(),
         CodeValue.GetHashCode(),
         IdentifierValue.GetHashCode(),
         GroupAddressValue.GetHashCode(),
         AccessKeyValue.GetHashCode()
     }.Xor());
 }
示例#2
0
 /// <summary>
 /// GetHashCode.
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     if (OID != 0 && CodeValue != null)
     {
         return(OID.GetHashCode() | CodeValue.GetHashCode());
     }
     if (OID != 0)
     {
         return(OID.GetHashCode());
     }
     return(SimpleType != null?SimpleType.GetHashCode() : base.GetHashCode());
 }
示例#3
0
 public void CodeValue_GetHashCode()
 {
     Assert.IsNotNull(codeValue.GetHashCode());
 }
示例#4
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     return(CodeValue.GetHashCode() * 251 + CodingSchemeDesignator.GetHashCode());
 }