DotNetWebToolkit.Cil2Js.Ast.VisitorSameStmt.AreSame C# (CSharp) Method

AreSame() public static method

public static AreSame ( Stmt a, Stmt b ) : bool
a Stmt
b Stmt
return bool
        public static bool AreSame(Stmt a, Stmt b) {
            if (a == null && b == null) {
                return true;
            }
            if (a == null || b == null) {
                return false;
            }
            if (a.StmtType != b.StmtType) {
                return false;
            }
            switch (a.StmtType) {
            case Stmt.NodeType.Continuation:
                var aCont = (StmtContinuation)a;
                var bCont = (StmtContinuation)b;
                return aCont.To == bCont.To;
            default:
                return false;
            }
        }

Usage Example

示例#1
0
 public static bool DoesEqual(this Stmt a, Stmt b)
 {
     return(VisitorSameStmt.AreSame(a, b));
 }
VisitorSameStmt