public JsExpression ReferenceNotEquals(JsExpression a, JsExpression b) { if (a.NodeType == ExpressionNodeType.Null) { return(JsExpression.Invocation(JsExpression.MemberAccess(JsExpression.Identifier("ss"), "isValue"), b)); } else if (b.NodeType == ExpressionNodeType.Null) { return(JsExpression.Invocation(JsExpression.MemberAccess(JsExpression.Identifier("ss"), "isValue"), a)); } else if (a.NodeType == ExpressionNodeType.String || b.NodeType == ExpressionNodeType.String) { return(JsExpression.NotSame(a, b)); } else { return(JsExpression.LogicalNot(JsExpression.Invocation(JsExpression.MemberAccess(JsExpression.Identifier("ss"), "referenceEquals"), a, b))); } }
public JsExpression ReferenceNotEquals(JsExpression a, JsExpression b, IRuntimeContext context) { if (a.NodeType == ExpressionNodeType.Null) { return(JsExpression.Invocation(JsExpression.Member(CreateTypeReferenceExpression(_systemScript), "isValue"), b)); } else if (b.NodeType == ExpressionNodeType.Null) { return(JsExpression.Invocation(JsExpression.Member(CreateTypeReferenceExpression(_systemScript), "isValue"), a)); } else if (a.NodeType == ExpressionNodeType.String || b.NodeType == ExpressionNodeType.String) { return(JsExpression.NotSame(a, b)); } else { return(JsExpression.LogicalNot(JsExpression.Invocation(JsExpression.Member(CreateTypeReferenceExpression(_systemScript), "referenceEquals"), a, b))); } }
public JsExpression ReferenceNotEquals(JsExpression a, JsExpression b) { if (a.NodeType == ExpressionNodeType.Null) { return(JsExpression.Invocation(JsExpression.Member(_createTypeReferenceExpression(ReflectionHelper.ParseReflectionName("System.Script")), "isValue"), b)); } else if (b.NodeType == ExpressionNodeType.Null) { return(JsExpression.Invocation(JsExpression.Member(_createTypeReferenceExpression(ReflectionHelper.ParseReflectionName("System.Script")), "isValue"), a)); } else if (a.NodeType == ExpressionNodeType.String || b.NodeType == ExpressionNodeType.String) { return(JsExpression.NotSame(a, b)); } else { return(JsExpression.LogicalNot(JsExpression.Invocation(JsExpression.Member(_createTypeReferenceExpression(ReflectionHelper.ParseReflectionName("System.Script")), "referenceEquals"), a, b))); } }