Esempio n. 1
0
        public void InvokeMethodRaw(Stream input)
        {
            using (var reader = new StreamReader(input))
            {
                var body = reader.ReadToEnd();
                var inputParams = HttpUtility.ParseQueryString(body);

                var options = new InvokeParams()
                {
                    TypeName = inputParams["typeName"],
                    MethodName = inputParams["methodName"],
                    FilePath = inputParams["filePath"]
                };

                this.InvokeMethodInternal(options);
            }

            HttpContext.Current.Response.Redirect("/invoker-form", true);
        }
Esempio n. 2
0
        private void InvokeMethodInternal(InvokeParams invokeParams)
        {
            var invokeOptions = new InvokeOptions()
            {
                ClassName = invokeParams.TypeName,
                MethodName = invokeParams.MethodName,
                Async = true
            };

            var compilerOptions = new CompilerOptions()
            {
                FilePath = invokeParams.FilePath,
                ReferencedAssemblyPaths = BuildManager.GetReferencedAssemblies().OfType<Assembly>().Select(x => x.Location).ToArray(),
                SignKeyPath = invokeParams.KeyPath,
                OutputAssemblyName = invokeParams.AsmName
            };

            MethodInvoker.Execute(invokeOptions, compilerOptions);
        }
Esempio n. 3
0
 public void InvokeMethodJson(InvokeParams options)
 {
     this.InvokeMethodInternal(options);
 }