コード例 #1
0
        public IStashEntry CreateStash(string lobbyPath, IImmutableList <string> paths)
        {
            StashEntry stash = new StashEntry(null, lobbyPath, paths);

            stashes.Insert(0, stash);
            return(stash);
        }
コード例 #2
0
        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);
        }