Exemplo n.º 1
0
 /// <summary>
 /// Compiles a given expression into a native lambda
 /// </summary>
 /// <typeparam name="TDelegate">
 /// The type of your delegate to convert to
 /// </typeparam>
 /// <param name="this">
 /// The object of which the method is called
 /// </param>
 /// <param name="protocol">
 /// This is a protocol, according to which all nodes get compiled. Use this
 /// if you want to use the compilation for types different from those standard
 /// </param>
 /// <param name="returnType">
 /// The type to which the resulting type will be casted
 /// </param>
 /// <param name="typesAndNames">
 /// An <see cref="IEnumerable"/> of pairs, where the first element is the type of your argument,
 /// and the second one is the corresponding variable from the expression
 /// </param>
 /// <returns>
 /// Returnes a natively compiled expression of type <typeparamref name="TDelegate"/>
 /// </returns>
 public static TDelegate Compile <TDelegate>(this string @this, CompilationProtocol protocol, Type returnType, IEnumerable <(Type type, Variable variable)> typesAndNames) where TDelegate : Delegate
Exemplo n.º 2
0
 internal static TDelegate Compile <TDelegate>(
     Entity expr,
     Type?returnType,
     CompilationProtocol protocol,
     IEnumerable <(Type type, Variable variable)> typesAndNames