Ejemplo n.º 1
0
Archivo: Program.cs Proyecto: T-rav/GD3
        private static int Display_Ranged_History(RangedHistory opts)
        {
            var presenter    = Create_Presenter(opts.Mode);
            var builder      = new SourceControlAnalysisBuilder();
            var statsUseCase = new RangedStatsUseCase(builder);
            var inputTo      = new RangedStatsInput
            {
                Path           = opts.Path,
                IgnorePatterns = opts.IgnorePatterns,
                Branch         = opts.Branch,
                WeekDays       = opts.WeekendDays,
                DaysPerWeek    = opts.WorkingDaysPerWeek,
                HoursPerWeek   = opts.WorkingHoursPerWeek,
                IgnoreComments = opts.IgnoreComments,
                AliasFile      = opts.AliasFile,
                RangeState     = opts.StartDate,
                RangeEnd       = opts.EndDate,
                WeekendDays    = opts.WeekendDays
            };

            statsUseCase.Execute(inputTo, presenter);
            presenter.Render();

            return(1);
        }
Ejemplo n.º 2
0
        private static int DisplayRangedHistory(RangedHistory opts)
        {
            using (var repo = new SourceControlAnalysisBuilder()
                              .WithPath(opts.Path)
                              .WithRange(opts.StartDate, opts.EndDate)
                              .WithIgnorePatterns(opts.IgnorePatterns)
                              .WithBranch(opts.Branch)
                              .WithWeekends(opts.WeekendDays)
                              .WithWorkingDaysPerWeek(opts.WorkingDaysPerWeek)
                              .WithWorkingWeekHours(opts.WorkingHoursPerWeek)
                              .WithIgnoreComments(opts.IgnoreComments)
                              .Build())
            {
                var dashboard = new CodeStatsDashboard();
                var authors   = repo.List_Authors();
                var stats     = repo.Build_Individual_Developer_Stats(authors);
                var teamStats = repo.Build_Team_Stats();
                dashboard.RenderDashboard(stats, teamStats, repo.ReportingRange);

                return(1);
            }
        }