claunia / plist-cil

C#/.NET parser for Apple and GnuStep Property List (aka plist), based on Java's dd-plist
Other
54 stars 17 forks source link

.NET Core Compatibility #4

Closed qmfrederik closed 8 years ago

qmfrederik commented 8 years ago

Hello!

This pull request adds support .NET Core, a new version of the .NET Framework (RC2 is currently available and the final release should ship in June). Things have changed a bit in the .NET Framework so some changes (luckly, not too many) in the plist-cil codebase were required.

Here's a rundown of them:

In all, with the current changes, the code compiles on .NET 4.5 and .NET Core. You could make it compile on .NET 4.0 as well by adding an #if statement, something I wanted to avoid, but let me know if .NET 4.0 support is important to you and I can fix that.

claunia commented 8 years ago

Hi @qmfrederik,

The .NET Core changes are greatly welcome.

BinarySerialization and synchronization come from the Java base code. I don't think they've been ever used.

But changing to .NET 4.5 worries me, I don't know if there would be people that need to target .NET 4.0, say people using Windows POSReady 2009 that's supported til 2019. How ugly would the #if be for that?

qmfrederik commented 8 years ago

Hi @claunia ,

Not that ugly at all, it turns out - there's one line where .NET 4.0 needs a special case, and the older Mono versions don't support the $"string" syntax yet, so I reverted that change, too.

Should be good to go now, let me know what you think.

claunia commented 8 years ago

Ok @qmfrederik , you missed updating README.md file to be all good to go.

qmfrederik commented 8 years ago

Cool, updating the README file was an easy fix :-)

claunia commented 8 years ago

Don't think so! On my DiscImageChef project I forget to commit the readme and todo files like, everytime ;) Naughty documentation!

Pull applied, thank you very much!