Пример #1
0
 /// <summary>
 /// Returns the hash code.
 /// The returned value will be cached until <see cref="YamlNode.OnChanged"/> is called.
 /// </summary>
 /// <returns>Hash code</returns>
 protected override int GetHashCodeCore()
 {
     if (NativeObjectAvailable)
     {
         if (NativeObject == null)
         {
             return(0);
         }
         else
         {
             return(NativeObject.GetHashCode());
         }
     }
     else
     {
         if (ShorthandTag() == "!!str")
         {
             return((Value.GetHashCode() * 193) ^ Tag.GetHashCode());
         }
         else
         {
             return(TypeUtils.GetHashCode(this));
         }
     }
 }
 public override int GetHashCode()
 {
     return(NativeObject.GetHashCode());
 }