コード例 #1
0
        private static ProjectParsingDataContext CreateDataContext(int sourceControlVersionId)
        {
            ProjectParsingDataContext dataContext = new ProjectParsingDataContext();

            dataContext.Initialize(sourceControlVersionId);

            return(dataContext);
        }
コード例 #2
0
        public void UpdateProjects(int sourceControlVersionId)
        {
            ProjectParsingDataContext dataContext = CreateDataContext(sourceControlVersionId);
            IList <IProjectParser>    strategies  = this.CreateStrategies(dataContext);

            ProjectParsingManager projectParsingManager = new ProjectParsingManager(strategies, dataContext);

            projectParsingManager.Execute();
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public ProjectParsingManager(IList <IProjectParser> strategies, ProjectParsingDataContext dataContext)
 {
     this.strategies  = strategies;
     this.dataContext = dataContext;
 }