コード例 #1
0
ファイル: YamlScalar.cs プロジェクト: oscarsan/YamlSerializer
 /// <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));
         }
     }
 }
コード例 #2
0
 public override int GetHashCode()
 {
     return(NativeObject.GetHashCode());
 }