Xamarin.IOS. Code Analysis - CA2123

I have a Microsoft Extended Correctness Rules for my Xamarin.IOS project. When I analyzed, I had a lot of problems:

  • CA2123 . Add the following security attribute to BooleanNegationConverter.Convert(object, Type, object, CultureInfo) to match the LinkDemand base method of IMvxValueConverter.Convert(object, Type, object, CultureInfo) : SecurityCriticalAttribute .

Why do I need to set security attributes? For what? Or should I do this?

  1. CA2134 . A transparent or safe critical method .get() is a critical method [simple self interface].get() in violation of the method override rules. .get() must become security critical in order to override a critical virtual method or implement a critical interface method.

The same ... How can I fix this for an iOS project? Why do I have this problem.

Thanks!

+5
source share
1 answer

Code access security is only partially and experimentally implemented in Mono.

Code Access Security (CAS) is a new experimental (i.e. unsupported) feature in the Mono 1.2 release. It is complete enough to play with it, but should not be used in production (incomplete and unaudited). Security Manager is turned off by default .

These warnings are important if the runtime uses this feature. It is not used on iOS and Android. Therefore, you can ignore it.

+4
source

Source: https://habr.com/ru/post/1247766/


All Articles