|
|
|
@ -2,7 +2,6 @@ |
|
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
|
|
|
|
|
|
import { dotnet } from './dotnet.js' |
|
|
|
import { createAvaloniaRuntime } from './avalonia.js' |
|
|
|
|
|
|
|
const is_browser = typeof window != "undefined"; |
|
|
|
if (!is_browser) throw new Error(`Expected to be running in a browser`); |
|
|
|
@ -12,13 +11,6 @@ const dotnetRuntime = await dotnet |
|
|
|
.withApplicationArgumentsFromQuery() |
|
|
|
.create(); |
|
|
|
|
|
|
|
const avaloniaRuntime = await createAvaloniaRuntime(dotnetRuntime); |
|
|
|
|
|
|
|
const outDiv = document.getElementById("out"); |
|
|
|
avaloniaRuntime.createAvaloniaView(outDiv); |
|
|
|
|
|
|
|
const config = dotnetRuntime.getConfig(); |
|
|
|
const exports = await dotnetRuntime.getAssemblyExports(config.mainAssemblyName); |
|
|
|
await exports.MyClass.TestDynamicModule(); |
|
|
|
|
|
|
|
await dotnetRuntime.runMainAndExit(config.mainAssemblyName, ["dotnet", "is", "great!"]); |
|
|
|
await dotnetRuntime.runMainAndExit(config.mainAssemblyName, ["dotnet", "is", "great!"]); |
|
|
|
|