Skip to content

Commit

Permalink
[Bot] Automated ReSharper CLT update
Browse files Browse the repository at this point in the history
  • Loading branch information
kreghek committed Jun 3, 2023
1 parent fd6a6d0 commit 7ba39d4
Showing 1 changed file with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using JetBrains.Annotations;

namespace CombatDicesTeam.Graphs.Generation.TemplateBased;

/// <summary>
/// Implemetation of graph generator based on templates and ways.
/// </summary>
/// <typeparam name="TNodePayload">Type of graph node data.</typeparam>
namespace CombatDicesTeam.Graphs.Generation.TemplateBased;

/// <summary>
/// Implemetation of graph generator based on templates and ways.
/// </summary>
/// <typeparam name="TNodePayload">Type of graph node data.</typeparam>
[PublicAPI]
public sealed class TemplateBasedGraphGenerator<TNodePayload> : IGraphGenerator<TNodePayload>
{
Expand All @@ -31,20 +31,20 @@ private static void ConnectNodes(IGraph<TNodePayload> graph, IList<IGraphNode<TN
}
}

private static IList<IGraphNode<TNodePayload>> CreateWayNodes(IGraphNode<GraphWay<TNodePayload>> way)
{
var list = new List<IGraphNode<TNodePayload>>();
foreach (var wayTemplate in way.Payload.WayTemplates)
{
var context = new GraphTemplateContext<TNodePayload>(list);
var node = wayTemplate.Create(context);
list.Add(node);
}

return list;
}

/// <inheritdoc />
private static IList<IGraphNode<TNodePayload>> CreateWayNodes(IGraphNode<GraphWay<TNodePayload>> way)
{
var list = new List<IGraphNode<TNodePayload>>();
foreach (var wayTemplate in way.Payload.WayTemplates)
{
var context = new GraphTemplateContext<TNodePayload>(list);
var node = wayTemplate.Create(context);
list.Add(node);
}

return list;
}

/// <inheritdoc />
public IGraph<TNodePayload> Create()
{
var wayGraph = _config.WayGraph;
Expand Down

0 comments on commit 7ba39d4

Please sign in to comment.