示例#1
0
 public StepEditionAggregate GetPublishedStep(int?minFunctionCount = null, int?maxFunctionCount = null)
 {
     return(StepEditionAggregate.Restore(_id, _name, _description, _headerCode, minFunctionCount,
                                         maxFunctionCount,
                                         _score, _difficulty,
                                         true,
                                         _languageId,
                                         new List <TestEntity>()));
 }
 private StepEditionAggregate ToAggregate(Step step)
 {
     return(StepEditionAggregate.Restore(
                new StepId(step.Id),
                step.Name,
                step.Description,
                step.HeaderCode,
                step.MinFunctionsCount,
                step.MaxFunctionsCount,
                step.Score,
                step.Difficulty,
                step.TournamentSteps.Any(tS => tS.Tournament.IsPublished),
                new ProgrammingLanguageId(step.ProgrammingLanguage.Id),
                step.Tests.Where(t => !t.IsDeleted).Select(ToTestEntity).ToList()
                ));
 }