The only thing I can think of is to have a look through the source code of the ASSP project and see if they have done anything similar that you can lift:
https://asstoredprocedures.codeplex.com/SourceControl/latest
Otherwise I guess it would be more of a .NET forum question.