mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
PMap return swapped to array
This commit is contained in:
parent
095f43b67b
commit
4945f95066
@ -461,7 +461,7 @@ namespace Wabbajack.Common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<TR> PMap<TI, TR>(this IEnumerable<TI> coll, WorkQueue queue, StatusUpdateTracker updateTracker,
|
public static TR[] PMap<TI, TR>(this IEnumerable<TI> coll, WorkQueue queue, StatusUpdateTracker updateTracker,
|
||||||
Func<TI, TR> f)
|
Func<TI, TR> f)
|
||||||
{
|
{
|
||||||
var cnt = 0;
|
var cnt = 0;
|
||||||
@ -487,7 +487,7 @@ namespace Wabbajack.Common
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static List<TR> PMap<TI, TR>(this IEnumerable<TI> coll, WorkQueue queue,
|
public static TR[] PMap<TI, TR>(this IEnumerable<TI> coll, WorkQueue queue,
|
||||||
Func<TI, TR> f)
|
Func<TI, TR> f)
|
||||||
{
|
{
|
||||||
var colllst = coll.ToList();
|
var colllst = coll.ToList();
|
||||||
@ -524,7 +524,7 @@ namespace Wabbajack.Common
|
|||||||
if (t.IsFaulted)
|
if (t.IsFaulted)
|
||||||
throw t.Exception;
|
throw t.Exception;
|
||||||
return t.Result;
|
return t.Result;
|
||||||
}).ToList();
|
}).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void PMap<TI>(this IEnumerable<TI> coll, WorkQueue queue, Action<TI> f)
|
public static void PMap<TI>(this IEnumerable<TI> coll, WorkQueue queue, Action<TI> f)
|
||||||
|
@ -39,7 +39,7 @@ namespace Wabbajack.Lib
|
|||||||
|
|
||||||
public bool ShowReportWhenFinished { get; set; } = true;
|
public bool ShowReportWhenFinished { get; set; } = true;
|
||||||
|
|
||||||
public List<Archive> SelectedArchives = new List<Archive>();
|
public ICollection<Archive> SelectedArchives = new List<Archive>();
|
||||||
public List<Directive> InstallDirectives = new List<Directive>();
|
public List<Directive> InstallDirectives = new List<Directive>();
|
||||||
public List<RawSourceFile> AllFiles = new List<RawSourceFile>();
|
public List<RawSourceFile> AllFiles = new List<RawSourceFile>();
|
||||||
public ModList ModList = new ModList();
|
public ModList ModList = new ModList();
|
||||||
|
@ -246,7 +246,7 @@ namespace Wabbajack.Lib
|
|||||||
{
|
{
|
||||||
GameType = GameRegistry.Games.Values.First(f => f.MO2Name == MO2Ini.General.gameName).Game,
|
GameType = GameRegistry.Games.Values.First(f => f.MO2Name == MO2Ini.General.gameName).Game,
|
||||||
WabbajackVersion = WabbajackVersion,
|
WabbajackVersion = WabbajackVersion,
|
||||||
Archives = SelectedArchives,
|
Archives = SelectedArchives.ToList(),
|
||||||
ModManager = ModManager.MO2,
|
ModManager = ModManager.MO2,
|
||||||
Directives = InstallDirectives,
|
Directives = InstallDirectives,
|
||||||
Name = ModListName ?? MO2Profile,
|
Name = ModListName ?? MO2Profile,
|
||||||
|
@ -195,7 +195,7 @@ namespace Wabbajack.Lib
|
|||||||
Readme = ModListReadme ?? "",
|
Readme = ModListReadme ?? "",
|
||||||
Image = ModListImage ?? "",
|
Image = ModListImage ?? "",
|
||||||
Website = ModListWebsite ?? "",
|
Website = ModListWebsite ?? "",
|
||||||
Archives = SelectedArchives,
|
Archives = SelectedArchives.ToList(),
|
||||||
ModManager = ModManager.Vortex,
|
ModManager = ModManager.Vortex,
|
||||||
Directives = InstallDirectives,
|
Directives = InstallDirectives,
|
||||||
GameType = Game
|
GameType = Game
|
||||||
|
@ -373,7 +373,7 @@ namespace Wabbajack.VirtualFileSystem
|
|||||||
public ImmutableDictionary<string, ImmutableStack<VirtualFile>> ByName { get; set; }
|
public ImmutableDictionary<string, ImmutableStack<VirtualFile>> ByName { get; set; }
|
||||||
public ImmutableDictionary<string, VirtualFile> ByRootPath { get; }
|
public ImmutableDictionary<string, VirtualFile> ByRootPath { get; }
|
||||||
|
|
||||||
public IndexRoot Integrate(List<VirtualFile> files)
|
public IndexRoot Integrate(ICollection<VirtualFile> files)
|
||||||
{
|
{
|
||||||
Utils.Log($"Integrating {files.Count} files");
|
Utils.Log($"Integrating {files.Count} files");
|
||||||
var allFiles = AllFiles.Concat(files).GroupBy(f => f.Name).Select(g => g.Last()).ToImmutableList();
|
var allFiles = AllFiles.Concat(files).GroupBy(f => f.Name).Select(g => g.Last()).ToImmutableList();
|
||||||
|
Loading…
Reference in New Issue
Block a user