Closed qmfrederik closed 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?
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.
Ok @qmfrederik , you missed updating README.md file to be all good to go.
Cool, updating the README file was an easy fix :-)
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!
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:
.Close
method onStream
,StreamReader
andStreamWriter
properties is now gone, and you should call.Dispose
instead. I changed to code to useusing
statements instead, a change which works on both .NET 4 and .NET CoreSystemException
class is no longer available (and was reserved for framework exceptions), so I've replaced it with aPropertyListException
BinarySerialization
is no longer available. Serializing .NET objects toNSData
using binary serialization is a neat idea, but I'm guessing that if you're using property lists, you want to maintain compatibility with how Apple serializes these objects (which will probably be using theNSKeyedArchiver
), so I was wondering if this functionality was ever used?MethodImpl.Synchronized
attribute which appeared unusedstring.GetCharEnumerator()
which is no longer available, you need to usestring.GetByteArray()
insteadIn 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.