public ExtendedList(
            Dictionary<ConsoleKey, TResult> choices,
            IDefaultValueComponent<TResult> defaultValueComponent,
            IConfirmComponent<TResult> confirmComponent,
            IRenderQuestionComponent displayQuestion,
             IWaitForInputComponent<StringOrKey> inputComponent,
            IParseComponent<ConsoleKey, TResult> parseComponent,
            IRenderChoices<TResult> renderChoices,
            IValidateComponent<TResult> validationResultComponent,
            IValidateComponent<ConsoleKey> validationInputComponent,
            IDisplayErrorComponent errorComponent,
            IOnKey onKey)
        {
            _choices = choices;
            _confirmComponent = confirmComponent;
            _displayQuestion = displayQuestion;
            _input = inputComponent;
            _parseComponent = parseComponent;
            _renderChoices = renderChoices;
            _validationInputComponent = validationInputComponent;
            _validationResultComponent = validationResultComponent;
            _errorComponent = errorComponent;
            _defaultValueComponent = defaultValueComponent;
            _onKey = onKey;

            Console.CursorVisible = false;
        }
Exemple #2
0
        public InputKey(
            IConfirmComponent <TResult> confirmComponent,
            IRenderQuestionComponent displayQuestion,
            IWaitForInputComponent <StringOrKey> inputComponent,
            IParseComponent <ConsoleKey, TResult> parseComponent,
            IValidateComponent <TResult> validationResultComponent,
            IValidateComponent <ConsoleKey> validationValueComponent,
            IDisplayErrorComponent errorComponent,
            IDefaultValueComponent <TResult> defaultComponent,
            IOnKey onKey)
        {
            _confirmComponent          = confirmComponent;
            _displayQuestion           = displayQuestion;
            _input                     = inputComponent;
            _parseComponent            = parseComponent;
            _validationResultComponent = validationResultComponent;
            _validationValueComponent  = validationValueComponent;
            _errorComponent            = errorComponent;
            _defaultValueComponent     = defaultComponent;
            _onKey                     = onKey;

            Console.CursorVisible = true;
        }