75 строки
1.6 KiB
Plaintext
75 строки
1.6 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import os\n",
|
|
"# os.environ[\"COREHOST_TRACE\"] = \"1\"\n",
|
|
"# os.environ[\"COREHOST_TRACE_VERBOSITY\"] = \"4\"\n",
|
|
"# os.environ[\"MONO_LOG_LEVEL\"] = \"debug\"\n",
|
|
"\n",
|
|
"from clr_loader import hostfxr, mono\n",
|
|
"from clr_loader.ffi import ffi\n",
|
|
"\n",
|
|
"core = hostfxr.HostFxr(\"example/out/example.runtimeconfig.json\")\n",
|
|
"mono = mono.Mono()\n",
|
|
"\n",
|
|
"func_core = core.get_callable(\"example/out/example.dll\", \"example.Class1, example\", \"Test\")\n",
|
|
"func_mono = mono.get_callable(\"example/out/example.dll\", \"example.Class1\", \"Test\")"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"0"
|
|
]
|
|
},
|
|
"execution_count": 2,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"func_core(ffi.NULL, 123)\n",
|
|
"func_mono(ffi.NULL, 124)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.7.4"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|