public IStashEntry CreateStash(string lobbyPath, IImmutableList <string> paths) { StashEntry stash = new StashEntry(null, lobbyPath, paths); stashes.Insert(0, stash); return(stash); }
public IStashEntry CreateStash(string lobbyPath, IImmutableList <string> paths, string name) { if (string.IsNullOrWhiteSpace(name)) { return(CreateStash(lobbyPath, paths)); } if (nameMap.TryGetValue(name, out int existingIndex)) { RemoveStash(existingIndex); } StashEntry stash = new StashEntry(name, lobbyPath, paths); stashes.Insert(0, stash); nameMap[name] = 0; return(stash); }