Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Commit

Permalink
Use mono formatters for non-integer types.
Browse files Browse the repository at this point in the history
Added BitConverter.DoubleToInt64Bits
  • Loading branch information
iskiselev committed Sep 19, 2015
1 parent 3866087 commit 87e7f5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,13 @@ JSIL.ImplementExternals("System.BitConverter", function ($) {
(new JSIL.MethodSignature($.Double, [$jsilcore.TypeRef("System.Array", [$.Byte]), $.Int32], [])),
$jsilcore.BytesToDouble
);

$.Method({ Static: true, Public: true }, "DoubleToInt64Bits",
(new JSIL.MethodSignature($.Int64, [$.Double], [])),
function DoubleToInt64Bits(double) {
return $jsilcore.BytesToInt64($jsilcore.BytesFromDouble(double));
}
);
});

//? if ('GENERATE_STUBS' in __out) {
Expand Down
4 changes: 2 additions & 2 deletions Proxies/Numbers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ public string ToString () {
throw new InvalidOperationException();
}

[JSReplacement("JSIL.NumberToFormattedString($this, null, $format)")]
[JSReplacement("$typeof(this).__PublicInterface__.$$ToString($this, $format, null)")]
public string ToString (string format) {
throw new InvalidOperationException();
}

[JSReplacement("JSIL.NumberToFormattedString($this, null, $format, $formatProvider)")]
[JSReplacement("$typeof(this).__PublicInterface__.$$ToString($this, $format, $formatProvider)")]
public string ToString (string format, IFormatProvider formatProvider) {
throw new InvalidOperationException();
}
Expand Down

0 comments on commit 87e7f5f

Please sign in to comment.