public static T Delegate(string content, AssemblyDomain domain = default, bool inCache = false, params NamespaceConverter[] usings) { var method = typeof(T).GetMethod("Invoke"); FakeMethodOperator @operator = new FakeMethodOperator(); @operator.Complier.Domain = domain; return(@operator .UseMethod(method) .Using(usings) .StaticMethodContent(content) .Complie <T>()); }
public static T UnsafeDelegate(string content, AssemblyDomain domain = default, ComplierResultTarget target = ComplierResultTarget.Stream, ComplierResultError error = ComplierResultError.None, params NamespaceConverter[] usings) { var method = typeof(T).GetMethod("Invoke"); FakeMethodOperator @operator = FakeMethodOperator.Create(domain, target, error); return(@operator .UseMethod(method) .UseUnsafe() .Using(usings) .StaticMethodContent(content) .Complie <T>()); }
public static T UnsafeDelegate(string content, AssemblyDomain domain = default, bool complieInFile = false, params NamespaceConverter[] usings) { var method = typeof(T).GetMethod("Invoke"); FakeMethodOperator @operator = FakeMethodOperator.Create(domain, complieInFile); return(@operator .UseMethod(method) .UseUnsafe() .Using(usings) .StaticMethodContent(content) .Complie <T>()); }
public static T UnsafeAsyncDelegate(string content, params NamespaceConverter[] usings) { var method = typeof(T).GetMethod("Invoke"); return(FakeMethodOperator.Default() .UseMethod(method) .UseUnsafe() .UseAsync() .Using(usings) .StaticMethodContent(content) .Complie <T>()); }
public static T UnsafeAsyncDelegate(string content, AssemblyDomain domain = default, Action<AssemblyComplier> option = default, params NamespaceConverter[] usings) { var method = typeof(T).GetMethod("Invoke"); return FakeMethodOperator.Create(domain, option) .UseMethod(method) .UseUnsafe() .UseAsync() .Using(usings) .StaticMethodContent(content) .Complie<T>(); }