public static void Main(string[] args) { // jsc needs to see args to make Main into main for javac.. // see also> // X:\jsc.svn\examples\javascript\android\AndroidBroadcastLogger\AndroidBroadcastLogger\ApplicationWebService.cs System.Console.WriteLine( typeof(object).AssemblyQualifiedName ); //0001 02000002 JVMMD5__i__d.jvm::JVMMD5.Program //script: error JSC1000: Java : Opcode not implemented: div.un at MD5.MD5Type.CalculateMD5Value //script: error JSC1000: Java : unable to emit stloc.1 at 'MD5.MD5Type.CalculateMD5Value'#0051: Java : Opcode not implemented: div.un at MD5.MD5Type.CalculateMD5Value //Implementation not found for type import : //type: System.UInt32 //method: System.String ToString(System.String) //Did you forget to add the [Script] attribute? //Please double check the signature! ulong u = 3614090360; // { u = -680876936 } Console.WriteLine(new { u }); var a = new MD5.MD5Type(); //a.FingerPrint a.ValueAsByte = Encoding.UTF8.GetBytes("hello world"); //var hash = Encoding.UTF8.GetBytes(e.ToLower()).ToMD5Bytes().ToHexString(); var hash = a.FingerPrint.ToLower(); Console.WriteLine(new { hash }); // { hash = 5eb63bbbe01eeed093cb22bb8f5acdc3 } // { hash = 5eb63bbbe01eeed093cb22bb8f5acdc3 } CLRProgram.CLRMain(); }
public ApplicationCanvas() { r.Fill = Brushes.Red; r.AttachTo(this); r.MoveTo(8, 8); this.SizeChanged += (s, e) => r.SizeTo(this.Width - 16.0, this.Height - 16.0); var email = new TextBox { Text = "*****@*****.**" }.AttachTo(this); Action update = delegate { //0001 02000006 AIRGravatarExperiment.ApplicationSprite::AIRGravatarExperiment.ApplicationCanvas+<>c__DisplayClass7+<>c__DisplayClass9 //script: error JSC1000: ActionScript : unable to emit newobj at 'MD5.MD5.set_ValueAsByte'#0016: Unable to transform overloaded constructors to a single constructor via optional parameters for MD5.MD5ChangingEventArgs //0001 02000009 AIRGravatarExperiment.ApplicationSprite::$ArrayType$256 //script: error JSC1000: ActionScript : // BCL needs another method, please define it. // Cannot call type without script attribute : // System.UInt32 for System.String ToString(System.String) used at // MD5.Digest.ToString at offset 0014. var a = new MD5.MD5Type(); //a.FingerPrint a.ValueAsByte = Encoding.UTF8.GetBytes(email.Text.ToLower()); //var hash = Encoding.UTF8.GetBytes(e.ToLower()).ToMD5Bytes().ToHexString(); var hash = a.FingerPrint.ToLower(); var src = ("http://www.gravatar.com/avatar/" + hash); var href = ("http://www.gravatar.com/" + hash); //srcu.tos var src_uri = new BitmapImage(); src_uri.BeginInit(); src_uri.UriSource = new Uri(src); src_uri.EndInit(); // X:\jsc.svn\examples\javascript\Avalon\AvalonInteractiveSketchupWarehouse\AvalonInteractiveSketchupWarehouse\InteractiveSketchupWarehouseCanvas.cs src_uri.DownloadCompleted += delegate { new Image { Source = src_uri }.AttachTo(this); //src_uri.toi //src_uri. }; }; email.TextChanged += delegate { update(); }; update(); }