public bool Equals(CallSetItemExpressionSegment x, CallSetItemExpressionSegment y) { if (x == null) { throw new ArgumentNullException("x"); } if (y == null) { throw new ArgumentNullException("y"); } var tokenSetComparer = new TokenSetComparer(); if (!tokenSetComparer.Equals(x.MemberAccessTokens, y.MemberAccessTokens)) { return(false); } var expressSetComparer = new ExpressionSetComparer(); if (!expressSetComparer.Equals(x.Arguments, y.Arguments)) { return(false); } if (x.ZeroArgumentBracketsPresence != y.ZeroArgumentBracketsPresence) { return(false); } return(true); }
public bool Equals(TranslatedStatementContentDetails x, TranslatedStatementContentDetails y) { if (x == null) { throw new ArgumentNullException("x"); } if (y == null) { throw new ArgumentNullException("y"); } if (x.TranslatedContent != y.TranslatedContent) { return(false); } var tokenSetComparer = new TokenSetComparer(); return(tokenSetComparer.Equals( x.VariablesAccessed.Distinct(new TokenComparer()), y.VariablesAccessed.Distinct(new TokenComparer()) )); }