Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
using JetBrains.Annotations;
using OpenScadGraphEditor.Library;
using OpenScadGraphEditor.Nodes;
namespace OpenScadGraphEditor.Refactorings
{
/// <summary>
/// Refactoring for nodes which implement <see cref="IHaveVariableInputSize"/>. This adds a new input to the node.
/// </summary>
[UsedImplicitly]
public class AddVariableInputRefactoring : NodeRefactoring
{
public AddVariableInputRefactoring(ScadGraph holder, ScadNode node) : base(holder, node)
{
}
public override void PerformRefactoring(RefactoringContext context)
{
if (!(Node is IHaveVariableInputSize variableInputSize))
{
return; // not applicable
}
variableInputSize.AddVariableInputPort();
}
}
}3ee9813f7This file is pinned to the selected release. Download the original to open it in your design tool.