Thursday, January 25, 2018

OfficeDevPnP classes and methods reference

Office 365 Developers Patterns and Practices library contains many useful methods for Sharepoint Online development. I would like to have some kind of reference page which would contain all methods from this doclib in one place so I can search them by Ctrl-F without pagination. In order to do such reference I used NDepend tool and built report from OfficeDevPnP.Core.dll v.2.22.1801.0 which is currently latest version for Sharepoint Online (note that for on-premise there is separate assembly). NDepend has useful feature called Code Query Linq (CQLinq) which allows you to make queries to the code in loaded assemblies, i.e. work with code as it would be data. E.g. for getting all methods with their parent classes I used the following Linq query:

   1: from m in Application.Methods
   2: let t = m.ParentType
   3: where !t.IsGeneratedByCompiler && !m.IsClassConstructor && !m.IsConstructor
   4: select new { m.ParentType, m }

After that exported report to Excel where added some formatting and saved to GitHub gist: https://gist.github.com/sadomovalex/74dc733c2b8a9a07a2ab23b7de705bf5.

You may use this gist as your reference for OfficeDevPnP as well.

No comments:

Post a Comment