public EditInputRendererTree() { var dateTimeInputRenderer = new DateTimeInputRenderer(); var textInputRenderer = new TextInputRenderer(); var numberInputRenderer = new NumberInputType(); var selectInputRenderer = new SelectInputRenderer(); numberInputRenderer.SetSuccessor(dateTimeInputRenderer); dateTimeInputRenderer.SetSuccessor(selectInputRenderer); selectInputRenderer.SetSuccessor(textInputRenderer); rendererTree = numberInputRenderer; }
public void SetSuccessor(AbstractEditInputRenderer editInputRenderer) => successor = editInputRenderer ?? throw new ArgumentNullException(nameof(editInputRenderer));