FastExpressionCompiler
FastExpressionCompiler copied to clipboard
Possible improvements if ever migration to C# 7.X+(7.3+ to be specific)
Now:
public static TDelegate TryCompile<TDelegate>(this LambdaExpression lambdaExpr)
where TDelegate : class =>
With C# 7.3 could be
public static TDelegate TryCompile<TDelegate>(this LambdaExpression lambdaExpr)
where TDelegate : System.Delegate =>
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/where-generic-type-constraint
I got into it when tried to use Delegate return parameter for some internal checks. E.g. more strictly typed Console.WriteLine(typeof(Action).GetMethod("Invoke").ReturnType); and better user documentation (also all knows that should pass delegate, but for most entry coders - still may be good).
Need to wait for Travis will update
CSC : error CS1617: Invalid option '7.3' for /langversion; must be ISO-1, ISO-2, Default, Latest or a valid version in range 1 to 7.1. [/Users/travis/build/dadhi/FastExpressionCompiler/test/FastExpressionCompiler.IssueTests/FastExpressionCompiler.IssueTests.csproj]
May do GC free copy free programming with
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/in-parameter-modifier and other ref improvements
outdated, implemented? ;)