Skip to content

Commit

Permalink
Update Mono to 078d5147836 (dotnet#543)
Browse files Browse the repository at this point in the history
* Update Mono to 078d5147836

* Update driver.c to match updated Mono version

* Rebuild Mono binaries

* Update dependency resolution baseline to match updated Mono BCL

* Add E2E test for new RuntimeInformation values
  • Loading branch information
SteveSandersonMS authored Apr 11, 2018
1 parent 4d93f6e commit b93b8b6
Show file tree
Hide file tree
Showing 75 changed files with 89,318 additions and 86,379 deletions.
14 changes: 14 additions & 0 deletions samples/MonoSanity/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@
</form>
</fieldset>

<fieldset>
<legend>Get runtime OS</legend>
<form id="getRuntimeInformation">
<button type="submit" disabled>Get</button>
<input id="getRuntimeInformationResult" readonly />
</form>
</fieldset>

<p id="loadingIndicator">Loading...</p>

<script type="blazor-boot"></script>
Expand Down Expand Up @@ -111,6 +119,12 @@
el('callJsNoBoxingResult').value = result;
};

el('getRuntimeInformation').onsubmit = function (evt) {
evt.preventDefault();
var result = invokeMonoMethod('MonoSanityClient', 'MonoSanityClient', 'Examples', 'GetRuntimeInformation', []);
el('getRuntimeInformationResult').value = result;
};

function el(id) {
return document.getElementById(id);
}
Expand Down
6 changes: 6 additions & 0 deletions samples/MonoSanityClient/Examples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Runtime.InteropServices;
using System.Text;
using WebAssembly;

Expand Down Expand Up @@ -53,5 +54,10 @@ public static string CallJsNoBoxing(int numberA, int numberB)

return $".NET received: {result}";
}

public static string GetRuntimeInformation()
=> $"OSDescription: '{RuntimeInformation.OSDescription}';"
+ $" OSArchitecture: '{RuntimeInformation.OSArchitecture}';"
+ $" IsOSPlatform(WEBASSEMBLY): '{RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY"))}'";
}
}
Loading

0 comments on commit b93b8b6

Please sign in to comment.