Пример #1
0
 public static StatementSyntax MkCSharpAssert(ExpressionSyntax expr, string errorMsg)
 {
     return(SyntaxFactory.IfStatement(
                CSharpHelper.MkCSharpNot(expr),
                SyntaxFactory.ThrowStatement(MkCSharpObjectCreationExpression(SyntaxFactory.IdentifierName("PrtAssertFailureException"), CSharpHelper.MkCSharpStringLiteralExpression(errorMsg)))));
 }