public SeedStageCommand(ILog log, DcsFilesystem dcsFiles, ExpandedChallenges expandedChallenges, Shell shell)
 {
     _log = log;
     _dcsFiles = dcsFiles;
     _expandedChallenges = expandedChallenges;
     _shell = shell;
 }
 public DcsScm(AppSettings settings, DcsFilesystem dcsFiles, Users users, ScmClient scm)
 {
     _settings = settings;
     _dcsFiles = dcsFiles;
     _users = users;
     _scm = scm;
 }
        public ChallengesEndpoint(DcsFilesystem dcsFiles)
            : base("/challenges")
        {
            Get["/{name}/stages/{number}/readme.txt"] = _ =>
            {
                string name = _.name;
                int number = _.number;
                var readmeFile = dcsFiles.ChallengesSource
                    .Challenges[name]
                    .Stage(new Stage(number))
                    .Readme;
                if (!readmeFile.Exists())
                {
                    return new NotFoundResponse();
                }
                return Response.AsText(readmeFile.ReadAllText(), "text/plain");
            };

            Get["/{name}/readme.txt"] = _ =>
            {
                string name = _.name;
                var readmeFile = dcsFiles.ChallengesSource.Challenges[name].Readme;
                if (!readmeFile.Exists())
                {
                    return new NotFoundResponse();
                }
                return Response.AsText(readmeFile.ReadAllText(), "text/plain");
                //using (var stream = readmeFile.OpenRead())
                //{
                //    return Response.FromStream(stream, "text/plain");
                //}
            };
        }
        public TestStagesCommand(DcsFilesystem dcsFilesystem, ExpandedChallenges expandedChallenges,
            AssessmentService assessmentService, ILog log, KillOrphansOperation killOrphansOperation)
        {
            _expandedChallenges = expandedChallenges;
            _assessmentService = assessmentService;
            _dcsFilesystem = dcsFilesystem;
            _log = log;
            _killOrphansOperation = killOrphansOperation;

            Cleanup = true;
        }
 public ExpandedChallenges(DcsFilesystem filesystem)
 {
     _filesystem = filesystem;
 }