コード例 #1
0
        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;
        }
コード例 #2
0
 public void SetSuccessor(AbstractEditInputRenderer editInputRenderer)
 => successor = editInputRenderer ?? throw new ArgumentNullException(nameof(editInputRenderer));