You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
В Onion есть возможность импортировать DLL написанные на Visual C# и на JavaScript
Пример:
Код на C#:
//first.dll
using System;
public class eng {
public void test(string ok, int ok2) {
Console.WriteLine(ok);
Console.Write(ok2);
}
}
Код на Onion:
use "std"
use "cs" /* Библиотека для использования DLL */
stack = new_stack()
append("stack", to_string("123"))
append("stack", to_int(32))
//first - название DLL
im = import_cs_class("first", "eng")
ins = get_cs_class_inst("first", "eng")
exec_cs_method(im, ins, "test", stack)
/*Output:
123
32
*/
stop()