Thanks @Liam Goldfinch
After solving the above issue manually now getting the error on the below code.
var classSites = ClassSiteInfoProvider.GetClassSites("SiteID = " + sourceSite.SiteID );
The error is No overload for method 'GetClassSites' takes 1 arguments
Do I need to solve it manually too?