From cdfd82359e9b266e6a4fd6f0646b474a4e33ab4f Mon Sep 17 00:00:00 2001 From: S3cur3Th1sSh1t <27858067+S3cur3Th1sSh1t@users.noreply.github.com> Date: Wed, 21 Aug 2024 22:25:35 +0200 Subject: [PATCH] Add run without redirect method --- src/clr/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/clr/mod.rs b/src/clr/mod.rs index 796205c..4e43b17 100644 --- a/src/clr/mod.rs +++ b/src/clr/mod.rs @@ -170,6 +170,15 @@ impl Clr { self.get_redirected_output() } + pub fn run_no_redirect(&mut self) -> Result { + let context = self.get_context()?; + let assembly = unsafe { (*(&context).app_domain).load_assembly(&self.contents)? }; + + unsafe { (*assembly).run_entrypoint(&self.arguments)? }; + + Ok("".to_string()) + } + pub fn redirect_output(&mut self) -> Result<(), String> { let context = self.get_context()?;