Пример #1
0
        public static T PromptIndexSelection <T>(this IConsole console, IEnumerable <T> source, Func <T, object> descriptionSelector, CollectionWriteStyle style, int?defaultValue)
        {
            var indexCollection = new IndexCollection <T>(source, descriptionSelector, isOptional: true, defaultValue: defaultValue);

            return(indexCollection.GetSelection(console, style));
        }
Пример #2
0
        public static T PromptIndexSelection <T>(this IConsole console, IEnumerable <T> source, bool writeInline = false, bool isOptional = false)
        {
            var indexCollection = new IndexCollection <T>(source, isOptional);

            return(indexCollection.GetSelection(console, writeInline));
        }
Пример #3
0
        public static T PromptIndexSelection <T>(this IConsole console, IEnumerable <T> source, CollectionWriteStyle style)
        {
            var indexCollection = new IndexCollection <T>(source);

            return(indexCollection.GetSelection(console, style));
        }