Skip to content

Commit 5856389

Browse files
authored
Merge pull request #35 from DevJasperNL/bugfix/using_override
Using override for RegisterNode instead of new.
2 parents 548e3ba + b579cd1 commit 5856389

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/AutomationPipelines/Pipeline.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public IPipeline<TState> SetDefault(TState state)
107107
/// <summary>
108108
/// Registers a new node in the pipeline. The node will be created using the type's parameterless constructor.
109109
/// </summary>
110-
public IPipeline<TState> RegisterNode<TNode>() where TNode : IPipelineNode<TState>
110+
public virtual IPipeline<TState> RegisterNode<TNode>() where TNode : IPipelineNode<TState>
111111
{
112112
return RegisterNode((TNode)Activator.CreateInstance(typeof(TNode))!);
113113
}

src/AutomationPipelines/ServiceProviderPipeline.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public ServiceProviderPipeline(
7676
/// <summary>
7777
/// Registers a new node in the pipeline. The node will be created using the service provider.
7878
/// </summary>
79-
public new IPipeline<TState> RegisterNode<TNode>() where TNode : IPipelineNode<TState>
79+
public override IPipeline<TState> RegisterNode<TNode>()
8080
{
8181
return RegisterNode(ActivatorUtilities.CreateInstance<TNode>(_serviceProvider));
8282
}

0 commit comments

Comments
 (0)