ExpressionCs

public static class ExpressionCs
Utility class for creating valid C# source and assemblies from expression syntax.

Methods

CSharpifyCode

#
Convert a string into a valid C# string.
public static string CSharpifyCode(
code
)

CSharpifySyntax

#
Process an expression and turn it into compilable CSharp code. This method will remove all comments from the code string, it will inject missing return statements and terminal semi-colons, exotic operators and constants. Undeclared variables will be replaced by C#-compliant method invokes.
public static SyntaxTree CSharpifySyntax(
code
Code to process.
)
Processed code.

TryCSharpifyAsBestAsPossible

#
Try and create the source code for an expression.
public static string TryCSharpifyAsBestAsPossible(
code
)