forked from dotnet/runtime
- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSecondRuntimeTest.js
More file actions
Latest commit
24 lines (21 loc) · 850 Bytes
/
Copy pathSecondRuntimeTest.js
File metadata and controls
24 lines (21 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
exportasyncfunctionrunSecondRuntimeAndTestStaticState(){
const{dotnet: dotnet2}=awaitimport('./_framework/dotnet.js?instance=2');
construntime2=awaitdotnet2
.withStartupMemoryCache(false)
.withConfig({
assetUniqueQuery: "?instance=2",
})
.create();
constincrement1=awaitgetIncrementStateFunction(App.runtime);
constincrement2=awaitgetIncrementStateFunction(runtime2);
increment1();
increment1();
increment2();
increment2();
conststate2=increment2();
returnstate2;
}
asyncfunctiongetIncrementStateFunction(runtime){
constexports=awaitruntime.getAssemblyExports("System.Runtime.InteropServices.JavaScript.Tests.dll");
returnexports.System.Runtime.InteropServices.JavaScript.Tests.SecondRuntimeTest.Interop.IncrementState;
}