mirror of
https://github.com/jcreek/CityFinder.git
synced 2026-07-14 19:33:43 +00:00
feat(*): Add base console application project
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 16
|
||||||
|
VisualStudioVersion = 16.0.31205.134
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CityFinder", "CityFinder\CityFinder.csproj", "{80932B17-EBEA-4F4C-A382-8A32718A886B}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{80932B17-EBEA-4F4C-A382-8A32718A886B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{80932B17-EBEA-4F4C-A382-8A32718A886B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{80932B17-EBEA-4F4C-A382-8A32718A886B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{80932B17-EBEA-4F4C-A382-8A32718A886B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {9B0F9F76-B04A-4810-B7EE-9C21E342CB3B}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net5.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="Program.cs">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
City finder
|
||||||
|
|
||||||
|
Challenge: User enters a country and zip/postal code - this should return the city
|
||||||
|
|
||||||
|
Option 1: Do the challenge with fake data
|
||||||
|
Option 2: Contact another api using for example https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=net-5.0 to get real data.
|
||||||
|
|
||||||
|
Info: If you want to validate a country code you could use https://docs.microsoft.com/en-us/dotnet/api/system.globalization.regioninfo?redirectedfrom=MSDN&view=net-5.0
|
||||||
|
|
||||||
|
public apis: https://github.com/public-apis/public-apis
|
||||||
|
*/
|
||||||
|
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using CityFinder.Models;
|
||||||
|
using System.Globalization;
|
||||||
|
using ConsoleTables;
|
||||||
|
|
||||||
|
namespace CityFinder
|
||||||
|
{
|
||||||
|
internal class Program
|
||||||
|
{
|
||||||
|
private static async Task Main(string[] args)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"CityFinder": {
|
||||||
|
"commandName": "Project"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user