Start a new topic
Solved

Cannot create anonymous object

 With this c# code:

        public void Send()
        {
            var obj = new { 
                action="Open"
            };
            string objMsg = obj.ToString();
            _connection.Send(objMsg);
        }

it fails on

 

var obj = new $asm.anonymousTypes[24].ctor("Open");
in the transpiled code. I guess not much successful transpilation?

DuoCode 1.1 released, this bug was fixed.

http://duoco.de/download


Thanks

Yes, it is ok with 0.6. I've thougth I was on 0.6 but was still on 0.4.

Thanks.

Just wanted to let you know, we reproduced and fixed this bug in the coming version 1.1, released this month.

Thanks for reporting.

I recall we had this issue on earlier versions of DuoCode, which version are you using?

Can u reproduce it on http://try.duoco.de/

Try to upgrade DuoCode to the latest one v0.6, I am sure it will sove it.



http://duoco.de/download

It is ok for "flat" anonymous objects but it still fails on "nested" objects like this:


 

            var obj = new
            {
                header = new {
                    name = "Message1"
                },
                body = new { 
                    action = "go!",
                    data = "blahblah"
                }
            };

Just tested on v1.0. 


Login or Signup to post a comment