diff --git a/JSIL.Libraries/Includes/Bootstrap/Core/Classes/System.BitConverter.js b/JSIL.Libraries/Includes/Bootstrap/Core/Classes/System.BitConverter.js index 7ad90c2aa..326c08abb 100644 --- a/JSIL.Libraries/Includes/Bootstrap/Core/Classes/System.BitConverter.js +++ b/JSIL.Libraries/Includes/Bootstrap/Core/Classes/System.BitConverter.js @@ -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) { diff --git a/Proxies/Numbers.cs b/Proxies/Numbers.cs index 1253aabf0..f026d0140 100644 --- a/Proxies/Numbers.cs +++ b/Proxies/Numbers.cs @@ -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(); }