SPC030202: Do not access SharePoint API via reflection |
SPC030202: Do not access SharePoint API via reflection |
It is not supported to access non public properties or methods of the SharePoint API, e.g. via reflection.
TypeName: | DoNotUseReflectionToAccessSharePointAPI |
CheckId: | SPC030202 |
Severity: | CriticalError |
Type: | AssemblyFileReference |
Remove the statement for accessing the SharePoint API via a reflection call.
The rule can lead to wrong results. The rule checks for appearances of Type.GetMethod(), Type.GetProperty(), Type.GetMethods(), Type.GetProperties() with BindingFlags.NonPublic and checks if the assembly references SharePoint assemblies. This indicates a non allowed access to a non public property or method. The rule cannot check if this operation has been applied for the SharePoint API but assumes that.
comments powered by Disqus
Copyright © 2013 RENCORE AB. All Rights Reserved
Disclaimer: The views and opinions expressed in this documentation and in SPCAF are those of the creators and do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. All trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners. SharePoint Code Analysis Framework, Version 4.5.2.7855, see www.spcaf.com for more information |