예제 #1
0
        public static IGeneratedCode <TResult> CreateCode <TResult>(
            ICompiler compiler,
            string sourceCode,
            IEnumerable <string> usingNamespaces,
            IEnumerable <string> referencedAssemblies,
            params CodeParameter[] parameters)
        {
            var d = compiler.CompileDelegate(sourceCode,
                                             usingNamespaces, typeof(TResult), referencedAssemblies, parameters);

            return(new Code <TResult>(d));
        }