ExpressionCs

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

Methods

CSharpifyCode

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

CSharpifySyntax

#
public static SyntaxTree CSharpifySyntax(string code)
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.
code (string)Code to process.
Processed code.

TryCSharpifyAsBestAsPossible

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