Exemple #1
0
        /// <summary>
        /// The RenderConsoleData.
        /// </summary>
        /// <param name="avDatas">The avDatas<see cref="List{AvData}"/>.</param>
        /// <param name="serviceProvider">The serviceProvider<see cref="IServiceProvider"/>.</param>
        public static void RenderConsoleData(List <AvData> avDatas, IServiceProvider serviceProvider)
        {
            avDatas.ForEach(e =>
            {
                var values = new List <NameValue>
                {
                    NameValue.Of("Number", e.Number),
                    NameValue.Of("Title", e.Title),
                    NameValue.Of("Year", e.Year),
                    NameValue.Of("Time", e.Time),
                    NameValue.Of("MainCover", e.MainCover),
                    NameValue.Of("ThumbUrl", e.ThumbUrl),
                    NameValue.Of("WebSiteUrl", e.WebSiteUrl),
                    NameValue.Of("PreviewVideo", e.PreviewVideo),
                    NameValue.Of("Outline", e.Outline),
                    NameValue.Of("Source", e.Source),
                    NameValue.Of("Studio", e.Studio),
                    NameValue.Of("Actors", e.Actors),
                    NameValue.Of("Director", e.Directors),
                    NameValue.Of("Tags", e.Tags),
                };
                values.AddRange(NameValue.AsList("Covers", e.Covers));
                values.AddRange(NameValue.AsList("Magnets", e.Magnets));

                ConsoleTable.From(values).Configure(o =>
                {
                    o.NumberAlignment = Alignment.Right;
                    o.EnableCount     = false;
                }
                                                    ).Write();
                Console.WriteLine();
            });
        }