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); }
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)); }
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)); }
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)); }