From 5b921cf3b523dc18a31e622225af3c75d78affcf Mon Sep 17 00:00:00 2001 From: m1chael888 Date: Tue, 10 Feb 2026 18:22:43 +0200 Subject: [PATCH 1/4] initial submission --- .../DrinksInfo.m1chael888.slnx | 3 + .../Controllers/DrinksController.cs | 61 ++++++++++++++ .../DrinksInfo.m1chael888.csproj | 17 ++++ .../DrinksInfo.m1chael888/Enums/Extensions.cs | 18 ++++ .../Enums/MainMenuEnums.cs | 15 ++++ .../Infratrstructure/Router.cs | 19 +++++ .../Models/CategoryModel.cs | 14 ++++ .../Models/DrinkModel.cs | 17 ++++ .../DrinksInfo.m1chael888/Program.cs | 30 +++++++ .../Services/DrinksService.cs | 51 +++++++++++ .../DrinksInfo.m1chael888/Views/DrinksView.cs | 84 +++++++++++++++++++ DrinksInfo.m1chael888/README.md | 6 ++ 12 files changed, 335 insertions(+) create mode 100644 DrinksInfo.m1chael888/DrinksInfo.m1chael888.slnx create mode 100644 DrinksInfo.m1chael888/DrinksInfo.m1chael888/Controllers/DrinksController.cs create mode 100644 DrinksInfo.m1chael888/DrinksInfo.m1chael888/DrinksInfo.m1chael888.csproj create mode 100644 DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/Extensions.cs create mode 100644 DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/MainMenuEnums.cs create mode 100644 DrinksInfo.m1chael888/DrinksInfo.m1chael888/Infratrstructure/Router.cs create mode 100644 DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/CategoryModel.cs create mode 100644 DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/DrinkModel.cs create mode 100644 DrinksInfo.m1chael888/DrinksInfo.m1chael888/Program.cs create mode 100644 DrinksInfo.m1chael888/DrinksInfo.m1chael888/Services/DrinksService.cs create mode 100644 DrinksInfo.m1chael888/DrinksInfo.m1chael888/Views/DrinksView.cs create mode 100644 DrinksInfo.m1chael888/README.md diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888.slnx b/DrinksInfo.m1chael888/DrinksInfo.m1chael888.slnx new file mode 100644 index 00000000..c0efd021 --- /dev/null +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888.slnx @@ -0,0 +1,3 @@ + + + diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Controllers/DrinksController.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Controllers/DrinksController.cs new file mode 100644 index 00000000..b21b83c2 --- /dev/null +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Controllers/DrinksController.cs @@ -0,0 +1,61 @@ +using DrinksInfo.m1chael888.Views; +using DrinksInfo.m1chael888.Services; +using DrinksInfo.m1chael888.Models; +using static DrinksInfo.m1chael888.Enums.MainMenuEnums; + +namespace DrinksInfo.m1chael888.Controllers +{ + public class DrinksController + { + private IDrinksView _drinksView; + private IDrinksService _drinksService; + public DrinksController(IDrinksView tableView, IDrinksService drinksService) + { + _drinksView = tableView; + _drinksService = drinksService; + } + + public void HandleMainMenu() + { + var choice = _drinksView.ShowMainMenu(); + + switch (choice) + { + case MainMenuOption.ViewCategories: + try + { + HandleCategoryChoice(); + } + catch (Exception ex) + { + _drinksView.ShowAccessError(ex.Message); + } + break; + case MainMenuOption.Exit: + Environment.Exit(0); + break; + } + } + + private void HandleCategoryChoice() + { + var categories = _drinksService.GetCategories(); + var categoryChoice = _drinksView.ShowCategoryPrompt(categories); + try + { + HandleDrinkChoice(categoryChoice); + } + catch (Exception ex) + { + _drinksView.ShowAccessError(ex.Message); + } + } + + private void HandleDrinkChoice(Category categoryChoice) + { + var drinks = _drinksService.GetDrinks(categoryChoice.strCategory); + var drinkChoice = _drinksView.ShowDrinkPrompt(drinks); + _drinksView.ShowDrinkInfo(drinkChoice); + } + } +} \ No newline at end of file diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/DrinksInfo.m1chael888.csproj b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/DrinksInfo.m1chael888.csproj new file mode 100644 index 00000000..bc546891 --- /dev/null +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/DrinksInfo.m1chael888.csproj @@ -0,0 +1,17 @@ + + + + Exe + net10.0 + enable + enable + + + + + + + + + + diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/Extensions.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/Extensions.cs new file mode 100644 index 00000000..6507fa9b --- /dev/null +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/Extensions.cs @@ -0,0 +1,18 @@ +using System.ComponentModel; + +namespace DrinksInfo.m1chael888.Enums +{ + public static class Extensions + { + public static string GetDescription(Enum value) + { + var field = value.GetType().GetField(value.ToString()); + var attributes = (DescriptionAttribute[])field.GetCustomAttributes(typeof(DescriptionAttribute), false); + if (attributes.Length > 0) + { + return attributes[0].Description; + } + return attributes[0].Description; + } + } +} diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/MainMenuEnums.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/MainMenuEnums.cs new file mode 100644 index 00000000..5187d4c9 --- /dev/null +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/MainMenuEnums.cs @@ -0,0 +1,15 @@ +using System.ComponentModel; + +namespace DrinksInfo.m1chael888.Enums +{ + public static class MainMenuEnums + { + public enum MainMenuOption + { + [Description("View Categories")] + ViewCategories, + [Description("Exit App")] + Exit + } + } +} diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Infratrstructure/Router.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Infratrstructure/Router.cs new file mode 100644 index 00000000..78a3f215 --- /dev/null +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Infratrstructure/Router.cs @@ -0,0 +1,19 @@ +using DrinksInfo.m1chael888.Controllers; + +namespace DrinksInfo.m1chael888.Infratrstructure +{ + public interface IRouter + { + void Route(DrinksController drinksController); + } + public class Router : IRouter + { + public void Route(DrinksController drinksController) + { + while (true) + { + drinksController.HandleMainMenu(); + } + } + } +} diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/CategoryModel.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/CategoryModel.cs new file mode 100644 index 00000000..530c638a --- /dev/null +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/CategoryModel.cs @@ -0,0 +1,14 @@ +using Newtonsoft.Json; + +namespace DrinksInfo.m1chael888.Models +{ + public class Category + { + public string strCategory { get; set; } + } + public class Categories + { + [JsonProperty("drinks")] + public List CategoriesList { get; set; } + } +} \ No newline at end of file diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/DrinkModel.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/DrinkModel.cs new file mode 100644 index 00000000..981f20c5 --- /dev/null +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/DrinkModel.cs @@ -0,0 +1,17 @@ +using Newtonsoft.Json; + +namespace DrinksInfo.m1chael888.Models +{ + public class Drink + { + public string strDrink { get; set; } + public int idDrink { get; set; } + public string strDrinkThumb { get; set; } + } + + public class Drinks + { + [JsonProperty("drinks")] + public List DrinkList { get; set; } + } +} diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Program.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Program.cs new file mode 100644 index 00000000..fe6792a9 --- /dev/null +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Program.cs @@ -0,0 +1,30 @@ +using Microsoft.Extensions.DependencyInjection; +using DrinksInfo.m1chael888.Infratrstructure; +using DrinksInfo.m1chael888.Services; +using DrinksInfo.m1chael888.Views; +using System.Text; +using DrinksInfo.m1chael888.Controllers; + +namespace DrinksInfo.m1chael888 +{ + internal class Program + { + static void Main(string[] args) + { + Console.OutputEncoding = Encoding.UTF8; + + var collection = new ServiceCollection(); + + collection.AddScoped(); + collection.AddScoped(); + collection.AddScoped(); + collection.AddScoped (); + + var provider = collection.BuildServiceProvider(); + + var drinksController = provider.GetRequiredService(); + var router = provider.GetRequiredService(); + router.Route(drinksController); + } + } +} \ No newline at end of file diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Services/DrinksService.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Services/DrinksService.cs new file mode 100644 index 00000000..ccea127c --- /dev/null +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Services/DrinksService.cs @@ -0,0 +1,51 @@ +using Newtonsoft.Json; +using RestSharp; +using DrinksInfo.m1chael888.Models; + +namespace DrinksInfo.m1chael888.Services +{ + public interface IDrinksService + { + List GetCategories(); + List GetDrinks(string category); + } + public class DrinksService : IDrinksService + { + private readonly string _drinkClient = "https://www.thecocktaildb.com/api/json/v1/1/"; + public List GetCategories() + { + var client = new RestClient(_drinkClient); + var request = new RestRequest("list.php?c=list"); + var response = client.ExecuteAsync(request); + + if (response.Result.StatusCode == System.Net.HttpStatusCode.OK) + { + var responseString = response.Result.Content; + var serialize = JsonConvert.DeserializeObject(responseString); + + List categories = serialize.CategoriesList; + + return categories; + } + return new List { }; + } + + public List GetDrinks(string category) + { + var client = new RestClient(_drinkClient); + var request = new RestRequest($"filter.php?c={category}"); + var response = client.ExecuteAsync(request); + + if (response.Result.StatusCode == System.Net.HttpStatusCode.OK) + { + var responseString = response.Result.Content; + var serialize = JsonConvert.DeserializeObject(responseString); + + List drinks = serialize.DrinkList; + + return drinks; + } + return new List { }; + } + } +} \ No newline at end of file diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Views/DrinksView.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Views/DrinksView.cs new file mode 100644 index 00000000..da34fdc6 --- /dev/null +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Views/DrinksView.cs @@ -0,0 +1,84 @@ +using Spectre.Console; +using DrinksInfo.m1chael888.Models; +using static DrinksInfo.m1chael888.Enums.Extensions; +using static DrinksInfo.m1chael888.Enums.MainMenuEnums; + +namespace DrinksInfo.m1chael888.Views +{ + public interface IDrinksView + { + Category ShowCategoryPrompt(List categories); + Drink ShowDrinkPrompt(List drinks); + void ShowDrinkInfo(Drink drink); + MainMenuOption ShowMainMenu(); + void ShowAccessError(string msg); + } + public class DrinksView : IDrinksView + { + public MainMenuOption ShowMainMenu() + { + Console.Clear(); + return AnsiConsole.Prompt( + new SelectionPrompt() + .Title("[cyan]Main Menu::[/]") + .AddChoices(Enum.GetValues()) + .UseConverter(x => $"[grey74]{GetDescription(x)}[/]") + .HighlightStyle("DarkOrange") + .WrapAround()); + } + + public Category ShowCategoryPrompt(List categories) + { + Console.Clear(); + return AnsiConsole.Prompt( + new SelectionPrompt() + .Title("[cyan]Choose a category to view::[/]") + .AddChoices(categories) + .UseConverter(x => $"[grey74]{x.strCategory}[/]") + .HighlightStyle("DarkOrange") + .PageSize(categories.Count) + .WrapAround()); + } + + public Drink ShowDrinkPrompt(List drinks) + { + Console.Clear(); + return AnsiConsole.Prompt( + new SelectionPrompt() + .Title("[cyan]Choose a drink::[/]") + .AddChoices(drinks) + .UseConverter(x => $"[grey74]{x.strDrink}[/]") + .HighlightStyle("DarkOrange") + .PageSize(25) + .WrapAround()); + } + + public void ShowDrinkInfo(Drink drink) + { + Console.Clear(); + AnsiConsole.MarkupLine($"[cyan]Drink info::[/]\n"); + AnsiConsole.MarkupLine($" [darkorange]Name -[/] [grey74]{drink.strDrink}[/]"); + AnsiConsole.MarkupLine($" [darkorange]Id -[/] [grey74]{drink.idDrink}[/]"); + AnsiConsole.MarkupLine($"[darkorange]Image -[/] [grey74]{drink.strDrinkThumb}[/]\n"); + ReturnToMenu(); + } + + public void ShowAccessError(string msg) + { + Console.Clear(); + AnsiConsole.MarkupLine($"[cyan]Error: {msg}[/]"); + ReturnToMenu(); + } + + private void ReturnToMenu() + { + AnsiConsole.Status() + .Spinner(Spinner.Known.Point) + .SpinnerStyle("grey74") + .Start("[grey74]Press any key to return to menu[/]", x => + { + Console.ReadKey(); + }); + } + } +} \ No newline at end of file diff --git a/DrinksInfo.m1chael888/README.md b/DrinksInfo.m1chael888/README.md new file mode 100644 index 00000000..5c7db7cf --- /dev/null +++ b/DrinksInfo.m1chael888/README.md @@ -0,0 +1,6 @@ +# DrinksInfo.m1chael888 +This is a simple program used to call a drinks menu API in a C# Console. API calls are done using RestSharp, and the results are displayed in the console using Spectre. + +# How it works +* Starting the app will display a main menu, allowing you to view drink categories or exit the app. Choosing to view categories will display a list of all available drink categories. To choose a category, navigate up and down the list using your arrow keys and press enter to select one. +* After choosing a category, a list of all matching drinks will be similarly displayed, and you can choose one in the same way. After choosing a drink, the details associated with it will be displayed, including the drinks name, id and thumbnail image url. You can then press any key to return to the menu. From 3707cca43ba97e15215f8f747911293e72e8e179 Mon Sep 17 00:00:00 2001 From: m1chael888 Date: Thu, 19 Feb 2026 23:47:46 +0200 Subject: [PATCH 2/4] Requested changes --- DrinksInfo.m1chael888/.gitattributes | 63 +++ DrinksInfo.m1chael888/.gitignore | 363 ++++++++++++++++++ .../Controllers/DrinksController.cs | 89 +++-- .../DrinksInfo.m1chael888/Enums/Extensions.cs | 17 +- .../Enums/MainMenuEnums.cs | 17 +- .../Infrastructure/Router.cs | 18 + .../Infratrstructure/Router.cs | 19 - .../Models/CategoryModel.cs | 19 +- .../Models/DrinkModel.cs | 23 +- .../DrinksInfo.m1chael888/Program.cs | 31 +- .../Services/DrinksService.cs | 67 ++-- .../DrinksInfo.m1chael888/Views/DrinksView.cs | 137 ++++--- 12 files changed, 654 insertions(+), 209 deletions(-) create mode 100644 DrinksInfo.m1chael888/.gitattributes create mode 100644 DrinksInfo.m1chael888/.gitignore create mode 100644 DrinksInfo.m1chael888/DrinksInfo.m1chael888/Infrastructure/Router.cs delete mode 100644 DrinksInfo.m1chael888/DrinksInfo.m1chael888/Infratrstructure/Router.cs diff --git a/DrinksInfo.m1chael888/.gitattributes b/DrinksInfo.m1chael888/.gitattributes new file mode 100644 index 00000000..1ff0c423 --- /dev/null +++ b/DrinksInfo.m1chael888/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/DrinksInfo.m1chael888/.gitignore b/DrinksInfo.m1chael888/.gitignore new file mode 100644 index 00000000..9491a2fd --- /dev/null +++ b/DrinksInfo.m1chael888/.gitignore @@ -0,0 +1,363 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Oo]ut/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd \ No newline at end of file diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Controllers/DrinksController.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Controllers/DrinksController.cs index b21b83c2..bab50d35 100644 --- a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Controllers/DrinksController.cs +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Controllers/DrinksController.cs @@ -2,44 +2,51 @@ using DrinksInfo.m1chael888.Services; using DrinksInfo.m1chael888.Models; using static DrinksInfo.m1chael888.Enums.MainMenuEnums; +using Spectre.Console; -namespace DrinksInfo.m1chael888.Controllers +namespace DrinksInfo.m1chael888.Controllers; + +public class DrinksController { - public class DrinksController + private readonly IDrinksView _drinksView; + private readonly IDrinksService _drinksService; + public DrinksController(IDrinksView tableView, IDrinksService drinksService) { - private IDrinksView _drinksView; - private IDrinksService _drinksService; - public DrinksController(IDrinksView tableView, IDrinksService drinksService) + _drinksView = tableView; + _drinksService = drinksService; + } + + public void HandleMainMenu() + { + var choice = _drinksView.ShowMainMenu(); + + switch (choice) { - _drinksView = tableView; - _drinksService = drinksService; + case MainMenuOption.ViewCategories: + try + { + HandleCategoryChoice(); + } + catch (Exception ex) + { + _drinksView.ShowAccessError(ex.Message); + } + break; + case MainMenuOption.Exit: + Environment.Exit(0); + break; } + } - public void HandleMainMenu() + private void HandleCategoryChoice() + { + var categories = _drinksService.GetCategories(); + if (categories.Count == 0) { - var choice = _drinksView.ShowMainMenu(); - - switch (choice) - { - case MainMenuOption.ViewCategories: - try - { - HandleCategoryChoice(); - } - catch (Exception ex) - { - _drinksView.ShowAccessError(ex.Message); - } - break; - case MainMenuOption.Exit: - Environment.Exit(0); - break; - } + ReturnStatus("Drinks menu currently unnavailable"); } - - private void HandleCategoryChoice() + else { - var categories = _drinksService.GetCategories(); var categoryChoice = _drinksView.ShowCategoryPrompt(categories); try { @@ -50,12 +57,32 @@ private void HandleCategoryChoice() _drinksView.ShowAccessError(ex.Message); } } + } - private void HandleDrinkChoice(Category categoryChoice) + private void HandleDrinkChoice(Category categoryChoice) + { + var drinks = _drinksService.GetDrinks(categoryChoice.strCategory); + if (drinks.Count == 0) + { + ReturnStatus("Drinks menu currently unnavailable"); + } + else { - var drinks = _drinksService.GetDrinks(categoryChoice.strCategory); var drinkChoice = _drinksView.ShowDrinkPrompt(drinks); _drinksView.ShowDrinkInfo(drinkChoice); } + + } + + private void ReturnStatus(string msg) + { + AnsiConsole.MarkupLine($"[cyan]{msg}[/]"); + AnsiConsole.Status() + .Spinner(Spinner.Known.Point) + .SpinnerStyle("white") + .Start($"[grey74]Press any key to return[/]", x => + { + Console.ReadKey(); + }); } } \ No newline at end of file diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/Extensions.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/Extensions.cs index 6507fa9b..83cfdbfa 100644 --- a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/Extensions.cs +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/Extensions.cs @@ -1,18 +1,17 @@ using System.ComponentModel; -namespace DrinksInfo.m1chael888.Enums +namespace DrinksInfo.m1chael888.Enums; + +public static class Extensions { - public static class Extensions + public static string GetDescription(Enum value) { - public static string GetDescription(Enum value) + var field = value.GetType().GetField(value.ToString()); + var attributes = (DescriptionAttribute[])field.GetCustomAttributes(typeof(DescriptionAttribute), false); + if (attributes.Length > 0) { - var field = value.GetType().GetField(value.ToString()); - var attributes = (DescriptionAttribute[])field.GetCustomAttributes(typeof(DescriptionAttribute), false); - if (attributes.Length > 0) - { - return attributes[0].Description; - } return attributes[0].Description; } + return value.ToString(); } } diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/MainMenuEnums.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/MainMenuEnums.cs index 5187d4c9..d3bd8ac8 100644 --- a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/MainMenuEnums.cs +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Enums/MainMenuEnums.cs @@ -1,15 +1,14 @@ using System.ComponentModel; -namespace DrinksInfo.m1chael888.Enums +namespace DrinksInfo.m1chael888.Enums; + +public static class MainMenuEnums { - public static class MainMenuEnums + public enum MainMenuOption { - public enum MainMenuOption - { - [Description("View Categories")] - ViewCategories, - [Description("Exit App")] - Exit - } + [Description("View Categories")] + ViewCategories, + [Description("Exit App")] + Exit } } diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Infrastructure/Router.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Infrastructure/Router.cs new file mode 100644 index 00000000..3d3b94a8 --- /dev/null +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Infrastructure/Router.cs @@ -0,0 +1,18 @@ +using DrinksInfo.m1chael888.Controllers; + +namespace DrinksInfo.m1chael888.Infrastructure; + +public interface IRouter +{ + void Route(DrinksController drinksController); +} +public class Router : IRouter +{ + public void Route(DrinksController drinksController) + { + while (true) + { + drinksController.HandleMainMenu(); + } + } +} diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Infratrstructure/Router.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Infratrstructure/Router.cs deleted file mode 100644 index 78a3f215..00000000 --- a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Infratrstructure/Router.cs +++ /dev/null @@ -1,19 +0,0 @@ -using DrinksInfo.m1chael888.Controllers; - -namespace DrinksInfo.m1chael888.Infratrstructure -{ - public interface IRouter - { - void Route(DrinksController drinksController); - } - public class Router : IRouter - { - public void Route(DrinksController drinksController) - { - while (true) - { - drinksController.HandleMainMenu(); - } - } - } -} diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/CategoryModel.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/CategoryModel.cs index 530c638a..19595b7f 100644 --- a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/CategoryModel.cs +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/CategoryModel.cs @@ -1,14 +1,13 @@ using Newtonsoft.Json; -namespace DrinksInfo.m1chael888.Models +namespace DrinksInfo.m1chael888.Models; + +public class Category +{ + public string strCategory { get; set; } = string.Empty; +} +public class Categories { - public class Category - { - public string strCategory { get; set; } - } - public class Categories - { - [JsonProperty("drinks")] - public List CategoriesList { get; set; } - } + [JsonProperty("drinks")] + public List CategoriesList { get; set; } } \ No newline at end of file diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/DrinkModel.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/DrinkModel.cs index 981f20c5..39b44687 100644 --- a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/DrinkModel.cs +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Models/DrinkModel.cs @@ -1,17 +1,16 @@ using Newtonsoft.Json; -namespace DrinksInfo.m1chael888.Models +namespace DrinksInfo.m1chael888.Models; + +public class Drink { - public class Drink - { - public string strDrink { get; set; } - public int idDrink { get; set; } - public string strDrinkThumb { get; set; } - } + public string strDrink { get; set; } = string.Empty; + public int idDrink { get; set; } + public string strDrinkThumb { get; set; } = string.Empty; +} - public class Drinks - { - [JsonProperty("drinks")] - public List DrinkList { get; set; } - } +public class Drinks +{ + [JsonProperty("drinks")] + public List DrinkList { get; set; } } diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Program.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Program.cs index fe6792a9..6241067a 100644 --- a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Program.cs +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Program.cs @@ -1,30 +1,29 @@ using Microsoft.Extensions.DependencyInjection; -using DrinksInfo.m1chael888.Infratrstructure; +using DrinksInfo.m1chael888.Infrastructure; using DrinksInfo.m1chael888.Services; using DrinksInfo.m1chael888.Views; using System.Text; using DrinksInfo.m1chael888.Controllers; -namespace DrinksInfo.m1chael888 +namespace DrinksInfo.m1chael888; + +internal class Program { - internal class Program + static void Main(string[] args) { - static void Main(string[] args) - { - Console.OutputEncoding = Encoding.UTF8; + Console.OutputEncoding = Encoding.UTF8; - var collection = new ServiceCollection(); + var collection = new ServiceCollection(); - collection.AddScoped(); - collection.AddScoped(); - collection.AddScoped(); - collection.AddScoped (); + collection.AddScoped(); + collection.AddScoped(); + collection.AddScoped(); + collection.AddScoped (); - var provider = collection.BuildServiceProvider(); + var provider = collection.BuildServiceProvider(); - var drinksController = provider.GetRequiredService(); - var router = provider.GetRequiredService(); - router.Route(drinksController); - } + var drinksController = provider.GetRequiredService(); + var router = provider.GetRequiredService(); + router.Route(drinksController); } } \ No newline at end of file diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Services/DrinksService.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Services/DrinksService.cs index ccea127c..cc19772c 100644 --- a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Services/DrinksService.cs +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Services/DrinksService.cs @@ -2,50 +2,49 @@ using RestSharp; using DrinksInfo.m1chael888.Models; -namespace DrinksInfo.m1chael888.Services +namespace DrinksInfo.m1chael888.Services; + +public interface IDrinksService { - public interface IDrinksService - { - List GetCategories(); - List GetDrinks(string category); - } - public class DrinksService : IDrinksService + List GetCategories(); + List GetDrinks(string category); +} +public class DrinksService : IDrinksService +{ + private readonly string _drinkClient = "https://www.thecocktaildb.com/api/json/v1/1/"; + public List GetCategories() { - private readonly string _drinkClient = "https://www.thecocktaildb.com/api/json/v1/1/"; - public List GetCategories() - { - var client = new RestClient(_drinkClient); - var request = new RestRequest("list.php?c=list"); - var response = client.ExecuteAsync(request); + var client = new RestClient(_drinkClient); + var request = new RestRequest("list.php?c=list"); + var response = client.ExecuteAsync(request); - if (response.Result.StatusCode == System.Net.HttpStatusCode.OK) - { - var responseString = response.Result.Content; - var serialize = JsonConvert.DeserializeObject(responseString); + if (response.Result.StatusCode == System.Net.HttpStatusCode.OK) + { + var responseString = response.Result.Content; + var serialize = JsonConvert.DeserializeObject(responseString); - List categories = serialize.CategoriesList; + List categories = serialize.CategoriesList; - return categories; - } - return new List { }; + return categories; } + return new List { }; + } - public List GetDrinks(string category) - { - var client = new RestClient(_drinkClient); - var request = new RestRequest($"filter.php?c={category}"); - var response = client.ExecuteAsync(request); + public List GetDrinks(string category) + { + var client = new RestClient(_drinkClient); + var request = new RestRequest($"filter.php?c={category}"); + var response = client.ExecuteAsync(request); - if (response.Result.StatusCode == System.Net.HttpStatusCode.OK) - { - var responseString = response.Result.Content; - var serialize = JsonConvert.DeserializeObject(responseString); + if (response.Result.StatusCode == System.Net.HttpStatusCode.OK) + { + var responseString = response.Result.Content; + var serialize = JsonConvert.DeserializeObject(responseString); - List drinks = serialize.DrinkList; + List drinks = serialize.DrinkList; - return drinks; - } - return new List { }; + return drinks; } + return new List { }; } } \ No newline at end of file diff --git a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Views/DrinksView.cs b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Views/DrinksView.cs index da34fdc6..e4c1a782 100644 --- a/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Views/DrinksView.cs +++ b/DrinksInfo.m1chael888/DrinksInfo.m1chael888/Views/DrinksView.cs @@ -3,82 +3,81 @@ using static DrinksInfo.m1chael888.Enums.Extensions; using static DrinksInfo.m1chael888.Enums.MainMenuEnums; -namespace DrinksInfo.m1chael888.Views +namespace DrinksInfo.m1chael888.Views; + +public interface IDrinksView +{ + Category ShowCategoryPrompt(List categories); + Drink ShowDrinkPrompt(List drinks); + void ShowDrinkInfo(Drink drink); + MainMenuOption ShowMainMenu(); + void ShowAccessError(string msg); +} +public class DrinksView : IDrinksView { - public interface IDrinksView + public MainMenuOption ShowMainMenu() { - Category ShowCategoryPrompt(List categories); - Drink ShowDrinkPrompt(List drinks); - void ShowDrinkInfo(Drink drink); - MainMenuOption ShowMainMenu(); - void ShowAccessError(string msg); + Console.Clear(); + return AnsiConsole.Prompt( + new SelectionPrompt() + .Title("[cyan]Main Menu::[/]") + .AddChoices(Enum.GetValues()) + .UseConverter(x => $"[grey74]{GetDescription(x)}[/]") + .HighlightStyle("DarkOrange") + .WrapAround()); } - public class DrinksView : IDrinksView - { - public MainMenuOption ShowMainMenu() - { - Console.Clear(); - return AnsiConsole.Prompt( - new SelectionPrompt() - .Title("[cyan]Main Menu::[/]") - .AddChoices(Enum.GetValues()) - .UseConverter(x => $"[grey74]{GetDescription(x)}[/]") - .HighlightStyle("DarkOrange") - .WrapAround()); - } - public Category ShowCategoryPrompt(List categories) - { - Console.Clear(); - return AnsiConsole.Prompt( - new SelectionPrompt() - .Title("[cyan]Choose a category to view::[/]") - .AddChoices(categories) - .UseConverter(x => $"[grey74]{x.strCategory}[/]") - .HighlightStyle("DarkOrange") - .PageSize(categories.Count) - .WrapAround()); - } + public Category ShowCategoryPrompt(List categories) + { + Console.Clear(); + return AnsiConsole.Prompt( + new SelectionPrompt() + .Title("[cyan]Choose a category to view::[/]") + .AddChoices(categories) + .UseConverter(x => $"[grey74]{x.strCategory}[/]") + .HighlightStyle("DarkOrange") + .PageSize(categories.Count) + .WrapAround()); + } - public Drink ShowDrinkPrompt(List drinks) - { - Console.Clear(); - return AnsiConsole.Prompt( - new SelectionPrompt() - .Title("[cyan]Choose a drink::[/]") - .AddChoices(drinks) - .UseConverter(x => $"[grey74]{x.strDrink}[/]") - .HighlightStyle("DarkOrange") - .PageSize(25) - .WrapAround()); - } + public Drink ShowDrinkPrompt(List drinks) + { + Console.Clear(); + return AnsiConsole.Prompt( + new SelectionPrompt() + .Title("[cyan]Choose a drink::[/]") + .AddChoices(drinks) + .UseConverter(x => $"[grey74]{x.strDrink}[/]") + .HighlightStyle("DarkOrange") + .PageSize(25) + .WrapAround()); + } - public void ShowDrinkInfo(Drink drink) - { - Console.Clear(); - AnsiConsole.MarkupLine($"[cyan]Drink info::[/]\n"); - AnsiConsole.MarkupLine($" [darkorange]Name -[/] [grey74]{drink.strDrink}[/]"); - AnsiConsole.MarkupLine($" [darkorange]Id -[/] [grey74]{drink.idDrink}[/]"); - AnsiConsole.MarkupLine($"[darkorange]Image -[/] [grey74]{drink.strDrinkThumb}[/]\n"); - ReturnToMenu(); - } + public void ShowDrinkInfo(Drink drink) + { + Console.Clear(); + AnsiConsole.MarkupLine($"[cyan]Drink info::[/]\n"); + AnsiConsole.MarkupLine($" [darkorange]Name -[/] [grey74]{drink.strDrink}[/]"); + AnsiConsole.MarkupLine($" [darkorange]Id -[/] [grey74]{drink.idDrink}[/]"); + AnsiConsole.MarkupLine($"[darkorange]Image -[/] [grey74]{drink.strDrinkThumb}[/]\n"); + ReturnToMenu(); + } - public void ShowAccessError(string msg) - { - Console.Clear(); - AnsiConsole.MarkupLine($"[cyan]Error: {msg}[/]"); - ReturnToMenu(); - } + public void ShowAccessError(string msg) + { + Console.Clear(); + AnsiConsole.MarkupLine($"[cyan]Error: {msg}[/]"); + ReturnToMenu(); + } - private void ReturnToMenu() - { - AnsiConsole.Status() - .Spinner(Spinner.Known.Point) - .SpinnerStyle("grey74") - .Start("[grey74]Press any key to return to menu[/]", x => - { - Console.ReadKey(); - }); - } + private void ReturnToMenu() + { + AnsiConsole.Status() + .Spinner(Spinner.Known.Point) + .SpinnerStyle("grey74") + .Start("[grey74]Press any key to return to menu[/]", x => + { + Console.ReadKey(); + }); } } \ No newline at end of file From de7af72cbe9c82bd436366df898535184b9bd7de Mon Sep 17 00:00:00 2001 From: m1chael888 Date: Thu, 19 Feb 2026 23:51:33 +0200 Subject: [PATCH 3/4] Delete DrinksInfo.m1chael888/.gitattributes --- DrinksInfo.m1chael888/.gitattributes | 63 ---------------------------- 1 file changed, 63 deletions(-) delete mode 100644 DrinksInfo.m1chael888/.gitattributes diff --git a/DrinksInfo.m1chael888/.gitattributes b/DrinksInfo.m1chael888/.gitattributes deleted file mode 100644 index 1ff0c423..00000000 --- a/DrinksInfo.m1chael888/.gitattributes +++ /dev/null @@ -1,63 +0,0 @@ -############################################################################### -# Set default behavior to automatically normalize line endings. -############################################################################### -* text=auto - -############################################################################### -# Set default behavior for command prompt diff. -# -# This is need for earlier builds of msysgit that does not have it on by -# default for csharp files. -# Note: This is only used by command line -############################################################################### -#*.cs diff=csharp - -############################################################################### -# Set the merge driver for project and solution files -# -# Merging from the command prompt will add diff markers to the files if there -# are conflicts (Merging from VS is not affected by the settings below, in VS -# the diff markers are never inserted). Diff markers may cause the following -# file extensions to fail to load in VS. An alternative would be to treat -# these files as binary and thus will always conflict and require user -# intervention with every merge. To do so, just uncomment the entries below -############################################################################### -#*.sln merge=binary -#*.csproj merge=binary -#*.vbproj merge=binary -#*.vcxproj merge=binary -#*.vcproj merge=binary -#*.dbproj merge=binary -#*.fsproj merge=binary -#*.lsproj merge=binary -#*.wixproj merge=binary -#*.modelproj merge=binary -#*.sqlproj merge=binary -#*.wwaproj merge=binary - -############################################################################### -# behavior for image files -# -# image files are treated as binary by default. -############################################################################### -#*.jpg binary -#*.png binary -#*.gif binary - -############################################################################### -# diff behavior for common document formats -# -# Convert binary document formats to text before diffing them. This feature -# is only available from the command line. Turn it on by uncommenting the -# entries below. -############################################################################### -#*.doc diff=astextplain -#*.DOC diff=astextplain -#*.docx diff=astextplain -#*.DOCX diff=astextplain -#*.dot diff=astextplain -#*.DOT diff=astextplain -#*.pdf diff=astextplain -#*.PDF diff=astextplain -#*.rtf diff=astextplain -#*.RTF diff=astextplain From abfcffc70052438bbc31e6185acee7ce403f7ade Mon Sep 17 00:00:00 2001 From: m1chael888 Date: Thu, 19 Feb 2026 23:51:48 +0200 Subject: [PATCH 4/4] Delete DrinksInfo.m1chael888/.gitignore --- DrinksInfo.m1chael888/.gitignore | 363 ------------------------------- 1 file changed, 363 deletions(-) delete mode 100644 DrinksInfo.m1chael888/.gitignore diff --git a/DrinksInfo.m1chael888/.gitignore b/DrinksInfo.m1chael888/.gitignore deleted file mode 100644 index 9491a2fd..00000000 --- a/DrinksInfo.m1chael888/.gitignore +++ /dev/null @@ -1,363 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Oo]ut/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd \ No newline at end of file