public object Execute(params string[] args) { if (args is null || args.Length < 2) { throw new InvalidCommandArrayException("Not enough parameters were passed. 2 parameters are required."); } var levelId = args[0]; var user = args[1]; if (string.IsNullOrWhiteSpace(levelId) || string.IsNullOrWhiteSpace(user)) { throw new InvalidCommandArrayException("No null or whitespace arguments are allowed."); } initializer.Clean(levelId, user); initializer.InitializeIfNecessary(levelId, user); return(null); }
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)); }