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