Support for MonoTouch, Mono for Android and MonoMac?

Apr 23, 2012 at 7:12 PM

Hi all,

  Just wondering if there are any plans to support the Mono toolset as stated in the title?

 

D.

Coordinator
Apr 23, 2012 at 9:46 PM

Next release will have a portable project that should run on those platforms.

Apr 24, 2012 at 7:32 AM

Thanks for the quick reply James. What is the time-frame for the next release, roughly?

Coordinator
Apr 24, 2012 at 10:08 AM

Now

http://json.codeplex.com/releases/view/86584

Apr 24, 2012 at 2:52 PM

When should we expect an update to the NuGet package?

Coordinator
Apr 26, 2012 at 4:51 AM

A couple of days ago.

Apr 26, 2012 at 11:04 AM

Hi James,

  I forked your repo on github and was hoping to provide you with MonoTouch and Mono for Android projects, but just using the PORTABLE #IFDEF does not seem enough. For example under Mono, IsEnum is a property and does not allow access to the IsEnum() method. What was the reason for using the method over the property?

Just thought I'd give you  heads up.

Once I have things compiling, I'll send through a pull request.

Apr 26, 2012 at 11:34 AM

Hi James,

  A pull request for MonoTouch/MonoDroid is now available from https://github.com/JamesNK/Newtonsoft.Json/pull/15

 

D.

Coordinator
Apr 26, 2012 at 12:09 PM

It is using the Type.IsEnum property.

I don't have either of those platforms. If a portable class library doesn't work on MonoTouch/MonoDroid then tell the Mono guys to fix it.

Apr 26, 2012 at 1:12 PM

Hi James,

  If you look at the diff here ( as one example )...

https://github.com/JamesNK/Newtonsoft.Json/pull/15/files#diff-12

The original code looks like this...

if (contract.UnderlyingType.IsInterface() || contract.UnderlyingType.IsAbstract())

How is IsInterface() a property rather than an method call?

Does the Microsoft compiler treats both like properties? How does it know when its a method call instead?

That is why in my pull request the above became...

 

if (contract.UnderlyingType.IsInterface || contract.UnderlyingType.IsAbstract)

This, to me, is clearer that these are properties rather than methods.

I'm just curious how the 2 compilers treat methods and properties differently.

Note, I don't have access to a Windows box right now, hence why I can't confirm this property/method conundrum.

D.

Coordinator
Apr 26, 2012 at 11:27 PM
Edited Apr 26, 2012 at 11:28 PM

Extension methods. IsEnum is used inside IsEnum()

Apr 27, 2012 at 7:21 PM

Damn that makes sense now. I was missing TypeExtension.cs from the project :S.