Add run without redirect method

This commit is contained in:
S3cur3Th1sSh1t
2024-08-21 22:25:35 +02:00
committed by GitHub
parent 3f8d35e46e
commit cdfd82359e
+9
View File
@@ -170,6 +170,15 @@ impl Clr {
self.get_redirected_output()
}
pub fn run_no_redirect(&mut self) -> Result<String, String> {
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()?;