コード例 #1
0
        public void Clean(string levelId, string user)
        {
            var level         = levelsProvider.GetLevel(levelId);
            var projectFolder = level.GetProjectFolder(user);

            levelInitializationDeterminer.UnmarkAsInitialized(level.GetUserFolder(user));
            path.FileSystem.Directory.Delete(projectFolder, true);
            path.FileSystem.Directory.CreateDirectory(projectFolder);
        }
コード例 #2
0
        public object Execute(params string[] args)
        {
            if (args == null || args.Length == 0)
            {
                throw new InvalidCommandArrayException("Not enough parameters were passed (0 out of 1).");
            }
            var level = provider.GetLevel(args[0]);

            return(LevelPathsProvider.GetInstructionsPath(level));
        }
コード例 #3
0
        public object Execute(params string[] args)
        {
            if (args is null)
            {
                ThrowNotEnoughParams(0);
            }
            else if (args.Length < 2)
            {
                ThrowNotEnoughParams(args.Length);
            }
            var levelId = args[0];
            var user    = args[1];
            var level   = provider.GetLevel(levelId);

            return(verifier.Verify(level, user));
        }
コード例 #4
0
        public object Execute(params string[] args)
        {
            if (args is null)
            {
                throw new InvalidCommandArrayException(string.Format(errorMessageFormat, 0));
            }
            else if (args.Length < 2)
            {
                throw new InvalidCommandArrayException(string.Format(errorMessageFormat, args.Length));
            }
            string levelId = args[0];
            string user    = args[1];

            levelInitializer.InitializeIfNecessary(levelId, user);

            return(levelsProvider.GetLevel(levelId).GetProjectFolder(user));
        }