[Mono-list] Not implemented exceptions in Getters
Dave Curylo
curylod at asme.org
Sun Jul 13 01:08:45 UTC 2014
Git blame shows Marek Safar added those properties. They are needed for
.NET 4.0 compatibility, but since mono does not support code access
security, they can't really be supported. The argument could be made for
these to return false since everything running under mono essentially runs
as fully trusted and nothing gets special treatment as "security critical"
code. Code access security is not implemented, but then at least these
properties could be.
To solve your immediate problem, you could provide a custom
IContractResolver and tell it to ignore get-only properties, which would
cover these that aren't implemented. Chances are good if you're
serializing types you can't control, you'll eventually need this sort of
customization anyway. See here for an example:
http://stackoverflow.com/questions/18543482/c-sharp-is-there-a-way-to-ignore-get-only-properties-in-json-net-serializer-with
On Saturday, July 12, 2014, Kevin Connell <kevin at connells.net> wrote:
>
> https://github.com/mono/mono/blob/master/mcs/class/corlib/System.Reflection/FieldInfo.cs
>
> Line 281
>
> Sorry, Not sure on the process for a pull request, but its a getter on a
> public property with a throw in the main branch,and its the same property
> that is indicated in the stack trace I sent.
>
> cc:author
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20140712/2efbd945/attachment-0001.html>
More information about the Mono-list
mailing list