diff --git a/src/ManiaMap.Tests/Generators/TestLayoutGraphSelector.cs b/src/ManiaMap.Tests/Generators/TestLayoutGraphSelector.cs index 846713d7..7f854e61 100644 --- a/src/ManiaMap.Tests/Generators/TestLayoutGraphSelector.cs +++ b/src/ManiaMap.Tests/Generators/TestLayoutGraphSelector.cs @@ -41,7 +41,7 @@ public void TestFunctionSelector() { var seed = new RandomSeed(12345); - var graphs = new List>() + var graphs = new List() { () => new LayoutGraph(1, "Graph1"), () => new LayoutGraph(2, "Graph2"), diff --git a/src/ManiaMap/Generators/LayoutGraphSelector.cs b/src/ManiaMap/Generators/LayoutGraphSelector.cs index 0282c87c..fff3a081 100644 --- a/src/ManiaMap/Generators/LayoutGraphSelector.cs +++ b/src/ManiaMap/Generators/LayoutGraphSelector.cs @@ -12,6 +12,11 @@ namespace MPewsey.ManiaMap.Generators /// public class LayoutGraphSelector : IPipelineStep { + /// + /// A delegate returning a LayoutGraph. + /// + public delegate LayoutGraph LayoutGraphDelegate(); + /// /// Draws a random layout graph and adds a copy to the results output dictionary. /// @@ -54,7 +59,7 @@ public LayoutGraph DrawSelection(IList graphs, RandomSeed randomSee /// A list of functions returning a layout graph. /// The random seed. /// The logging action. Ignored if null. - public LayoutGraph DrawSelection(IList> functions, RandomSeed randomSeed, Action logger = null) + public LayoutGraph DrawSelection(IList functions, RandomSeed randomSeed, Action logger = null) { logger?.Invoke("[Layout Graph Selector] Applying layout graph delegate list selector..."); var index = randomSeed.Next(0, functions.Count); @@ -78,7 +83,7 @@ public LayoutGraph DrawSelection(object graphs, RandomSeed randomSeed, Action list: return DrawSelection(list, randomSeed, logger); - case IList> functions: + case IList functions: return DrawSelection(functions, randomSeed, logger); default: throw new ArgumentException($"Unhandled type for `graphs`: {graphs.GetType()}.");