private static ProjectParsingDataContext CreateDataContext(int sourceControlVersionId) { ProjectParsingDataContext dataContext = new ProjectParsingDataContext(); dataContext.Initialize(sourceControlVersionId); return(dataContext); }
public void UpdateProjects(int sourceControlVersionId) { ProjectParsingDataContext dataContext = CreateDataContext(sourceControlVersionId); IList <IProjectParser> strategies = this.CreateStrategies(dataContext); ProjectParsingManager projectParsingManager = new ProjectParsingManager(strategies, dataContext); projectParsingManager.Execute(); }
private IList <IProjectParser> CreateStrategies(ProjectParsingDataContext dataContext) { string sourcesFolder = this.pathServices.GetSourceControlVersionPath(dataContext.SourceControlVersion.SourceControlId, dataContext.SourceControlVersion.Id); IList <IProjectParser> strategies = new List <IProjectParser>() { new VisualStudioProjectParser(sourcesFolder), new ZipFilesParser(sourcesFolder), new GulpParser(sourcesFolder) }; return(strategies); }
public ProjectParsingManager(IList <IProjectParser> strategies, ProjectParsingDataContext dataContext) { this.strategies = strategies; this.dataContext = dataContext; }