Below is the open sourced code for dynamo, I would suggest you watch out with what you do because some of the parts are not open sourced as per license note within dynamo.
Source code for dynamo GitHub - DynamoDS/Dynamo: Open Source Graphical Programming for Design
Source code for Dynamo for revit: GitHub - DynamoDS/DynamoRevit: Dynamo Libraries for Revit