protected void Session_Start(object sender, EventArgs e) { // Create github contributors synchronizer IContributorDataStore contributorDataStore = new ContributorDataStoreInFile(AppDomain.CurrentDomain.BaseDirectory + @"\App_Data\Contributors.bin"); IGitHubContributorsJsonProvider gitHubContributorsJsonProvider = new GitHubContributorsJsonProvider(); IGitHubContributorsProvider gitHubContributorsProvider = new GitHubContributorsProvider(gitHubContributorsJsonProvider); ISynchronizer gitHubContributorsSynchronizer = new GitHubContributorsSynchronizer(gitHubContributorsProvider, contributorDataStore); // Create stack overflow faq synchronizer // TODO // Create nuget package synchronizer // TODO // Register all the synchronizers and run the synchronization agent ISynchronizationTaskDataStore synchronizationTaskDataStore = new SynchronizationTaskDataStoreInFile(AppDomain.CurrentDomain.BaseDirectory + @"\App_Data\SynchronizationTasks.bin"); ISynchronizationAgent synchronizationAgent = new SynchronizationAgent(synchronizationTaskDataStore); synchronizationAgent.Register(gitHubContributorsSynchronizer); synchronizationAgent.Run(); }
public ActionResult Contributors() { var contributorDataStore = new ContributorDataStoreInFile(AppDomain.CurrentDomain.BaseDirectory + @"\App_Data\Contributors.bin"); var contributors = contributorDataStore.GetAll(); return View(contributors); }