I want to create a custom workflow for an existing list or library with code in visual studio and I do not want to do it on this way : Create VS WorkFlow
I want to create the workflow from the beginning using code (to specify the stages) and then to publish it to SharePoint.