public StructReferenceEquals ( RubyStruct other ) : bool | ||
other | RubyStruct | |
리턴 | bool |
public static bool Equals(BinaryOpStorage /*!*/ equals, RubyStruct /*!*/ self, object obj) { var other = obj as RubyStruct; if (!self.StructReferenceEquals(other)) { return(false); } Debug.Assert(self.ItemCount == other.ItemCount); return(IListOps.Equals(equals, self.Values, other.Values)); }
public static bool Equals(RubyStruct /*!*/ self, object obj) { var other = obj as RubyStruct; if (!self.StructReferenceEquals(other)) { return(false); } Debug.Assert(self.ItemCount == other.ItemCount); for (int i = 0; i < self.Values.Length; i++) { if (!RubySites.Equal(self.Class.Context, self.Values[i], other.Values[i])) { return(false); } } return(true); }
public static bool Equals(BinaryOpStorage /*!*/ equals, RubyStruct /*!*/ self, object obj) { var other = obj as RubyStruct; if (!self.StructReferenceEquals(other)) { return(false); } Debug.Assert(self.ItemCount == other.ItemCount); if (self.Values.Length > 0) { var site = equals.GetCallSite("=="); for (int i = 0; i < self.Values.Length; i++) { if (RubyOps.IsFalse(site.Target(site, self.Values[i], other.Values[i]))) { return(false); } } } return(true); }
public static bool Equals(BinaryOpStorage/*!*/ equals, RubyStruct/*!*/ self, object obj) { var other = obj as RubyStruct; if (!self.StructReferenceEquals(other)) { return false; } Debug.Assert(self.ItemCount == other.ItemCount); return IListOps.Equals(equals, self.Values, other.Values); }
public static bool Equals(BinaryOpStorage/*!*/ equals, RubyStruct/*!*/ self, object obj) { var other = obj as RubyStruct; if (!self.StructReferenceEquals(other)) { return false; } Debug.Assert(self.ItemCount == other.ItemCount); if (self.Values.Length > 0) { var site = equals.GetCallSite("=="); for (int i = 0; i < self.Values.Length; i++) { if (RubyOps.IsFalse(site.Target(site, self.Values[i], other.Values[i]))) { return false; } } } return true; }