PromptPlus Migrate
PromptPlus v4 has been completely rebuilt for a better experience, with significant improvements with new controls and more developer power. The console driver now supports better rendering, with the ability to detect terminal capabilities and allow for 24-bit color, text overflow strategies based on terminal size, and left and right margins for a nicer layout. The Controls have been revised to be more responsive, allow color styles in many of their elements, and adapt to the terminal size even with resizing.
Console
- Removed: string.Underline()
- Removed: string.Strikeout()
- Removed: string.[color]()
- See new Color Syntax
- Changed:
- PromptPlus.DefaultCulture
- TO: PromptPlus.Config.DefaultCulture
- Changed:
- PromptPlus.CursorPosition
- TO: PromptPlus.Config.SetCursorPosition
- Changed:
- ClearRestOfLine(Consolecolor)
- TO: ClearRestOfLine(Style)
- Changed:
- WriteLine(string, forecolor,backcolor)
- TO: WriteLine(string, style)
Validators
- Changed:
- Namespace : PromptPlusValidators
- TO: PromptValidators
- Changed:
- inst.ImportValidators(x => x.MyInput)
- TO : ImportValidators(inst, x => x.MyInput)
Controls
- Removed: HideSymbolPromptAndResult
- Removed: EnabledAbortAllPipes
- Removed: EnabledPromptTooltip
- Removed: SaveConfigToFile
- Removed: LoadConfigFromFile
- Removed: Pipeline Contol
- Removed: Readline Contol.
- Now, see new console command PromptPlus.ReadLineWithEmacs
- Changed:
- AddValidator(Func<object, ValidationResult> validator)
- AddValidators(IEnumerable<Func<object, ValidationResult» validators)
- TO: AddValidators(params Func<object, ValidationResult>[] validators)
- Changed:
- DescriptionSelector(Func<T, string> value);
- TO: ChangeDescription(Func<string, string> value);
- Changed:
- SuggestionHandler(Func<SuggestionInput, SuggestionOutput> value, bool EnterTryFininsh = false)
- TO: SuggestionHandler(Func<SuggestionInput, SuggestionOutput> value);
Autocomplete
- Removed: CompletionInterval(value)
- Removed: AcceptWithoutMatch()
- Changed:
- SpeedAnimation(int value)
- TO: Spinner(SpinnersType spinnersType, Style? SpinnerStyle = null, int? speedAnimation = null, IEnumerable
? customspinner = null)
- Changed:
- CaseInsensitive(value)
- TO: InputToCase(CaseOptions)
- Changed:
- CompletionAsyncService(Func<string, int, CancellationToken, Task<string[]» value);
- CompletionWithDescriptionAsyncService(Func<string, int, CancellationToken, Task<ValueDescription
[]>> value); - TO: CompletionAsyncService(Func<string, int, CancellationToken, Task<string[]» value);
Select
- Changed:
- HideItem(T value)
- TO: AddItemTo(AdderScopee, T value)
- Changed:
- HideItems(IEnumerable
value) - TO:AddItemsTo(AdderScope scope, IEnumerable
values)
- HideItems(IEnumerable
- Changed:
- DisableItem(T value)
- TO: AddItemTo(AdderScopee, T value)
- Changed:
- DisableItems(IEnumerable
value) - TO:AddItemsTo(AdderScope scope, IEnumerable
values)
- DisableItems(IEnumerable
- Changed:
- Default(T value, Func<T,T,bool> funcfound=null);
- TO: Default(T value)
- AutoSelectIfOne()
- TO: AutoSelect()
Multiselect
- Changed:
- AddGroup(IEnumerable
value, string group) - TO :AddItemGrouped(string group, T value, bool disable = false, bool selected = false)
- AddGroup(IEnumerable
- Changed:
- ShowGroupOnDescription(string)
- TO: AppendGroupOnDescription()
- Changed:
- HideItem(T value)
- TO: AddItemTo(AdderScopee, T value)
- Changed:
- HideItems(IEnumerable
value) - TO:AddItemsTo(AdderScope scope, IEnumerable
values)
- HideItems(IEnumerable
- Changed:
- DisableItem(T value)
- TO: AddItemTo(AdderScopee, T value)
- Changed:
- DisableItems(IEnumerable
value) - TO:AddItemsTo(AdderScope scope, IEnumerable
values)
- DisableItems(IEnumerable
- Changed:
- AddDefault(T value, Func<T, T, bool> funcfound = null)
- AddItem(T value, bool disable = false, bool selected = false)
- Changed:
- AddDefaults(IEnumerable
value, Func<T, T, bool> funcfound = null) - AddItems(IEnumerable
values, bool disable = false, bool selected = false);
- AddDefaults(IEnumerable
MaskEdit
- Changed:
- PromptPlus.MaskEdit(MaskedType, string)
- TO: PromptPlus.MaskEdit(string) when Generic Type
- Changed:
- PromptPlus.MaskEdit(MaskedType, string)
- TO: PromptPlus.MaskEdit(string).Mask(MaskedType) when NOT Generic Type
- Changed:
- ResultMasked.Value.ObjectValue
- TO: ResultMasked.Value.Masked
- Changed:
- Default(object value)
- TO: Default(string value)
- Changed:
- Removed AcceptSignal(bool)
- AmmoutPositions(int, int)
- TO: AmmoutPositions(int, int, bool) with AcceptSignal
- Changed:
- FormatYear.Y4 : FormatYear.Y2
- TO: FormatYear.Long, FormatYear.Short
- Changed:
- ShowDayWeek(FormatWeek)
- TO: DescriptionWithInputType(FormatWeek)
- Changed:
- FillZeros(bool)
- TO: FillZeros()
- Changed:
- UpperCase(bool)
- TO: InputToCase(CaseOptions)
Input
- Changed:
- IsPassword(bool value)
- TO: IsSecret()
- Changed:
- InitialValue(string value)
- TO: Default(string value)
- Changed:
- Default(string value)
- TO: DefaultIfEmpty(string value)
Keypress
- Many Changes, see new Keypress Control
Slider (Number/Switch)
- Many Changes, see new Sliders Control
List
- Many Changes, see new AddtoList Control
ListMasked
- Many Changes, see new AddtoMaskEditList Control
Confirm
- Many Changes, see new Confirm Control
Browser
- Many Changes, see new Browse Control
Tasks
- Many Changes, see new WaitProcess Control
Progressbar
- Many Changes, see new Progressbar Control