public static string run_before_start(string filepath, int tuner_idx, string script_file_path) { IScriptType1 script = get_interface_from_file(script_file_path); if (script != null) { return(script.before_start(filepath, tuner_idx)); } return(null); }
private static IScriptType1 get_interface_from_file(string script_file_path) { var stream_reader = new StreamReader(script_file_path); string code = stream_reader.ReadToEnd(); stream_reader.Close(); Assembly compiled_script = CompileCode(code); if (compiled_script != null) { IScriptType1 script = get_interface(compiled_script); return(script); } return(null); }