From 027cdfe72247665e40c1663d4144d92fbb8fa221 Mon Sep 17 00:00:00 2001 From: Mark van der Wal Date: Wed, 22 Apr 2020 12:51:53 +0200 Subject: [PATCH] Setup haulmkilling sample application --- FarmmapsApiSamples.sln | 15 ++++++++---- .../FarmmapsHaulmkilling.csproj | 20 ++++++++++++++++ .../HaulmkillingApplication.cs | 13 +++++++++++ FarmmapsHaulmkilling/HaulmkillingService.cs | 7 ++++++ FarmmapsHaulmkilling/Program.cs | 23 +++++++++++++++++++ FarmmapsHaulmkilling/appsettings.json | 10 ++++++++ 6 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 FarmmapsHaulmkilling/FarmmapsHaulmkilling.csproj create mode 100644 FarmmapsHaulmkilling/HaulmkillingApplication.cs create mode 100644 FarmmapsHaulmkilling/HaulmkillingService.cs create mode 100644 FarmmapsHaulmkilling/Program.cs create mode 100644 FarmmapsHaulmkilling/appsettings.json diff --git a/FarmmapsApiSamples.sln b/FarmmapsApiSamples.sln index 5573bb0..256b705 100644 --- a/FarmmapsApiSamples.sln +++ b/FarmmapsApiSamples.sln @@ -1,17 +1,20 @@  Microsoft Visual Studio Solution File, Format Version 12.00 +# Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FarmmapsNbs", "FarmmapsNbs\FarmmapsNbs.csproj", "{E08EF7E9-F09E-42D8-825C-164E458C78F4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FarmmapsApi", "FarmmapsApi\FarmmapsApi.csproj", "{1FA9E50B-F45E-4534-953A-37C783D03C74}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "General", "General", "{6FA66E07-A59E-480E-B5D1-DBEFC4E4583D}" -ProjectSection(SolutionItems) = preProject - README.MD = README.MD - .gitignore = .gitignore -EndProjectSection + ProjectSection(SolutionItems) = preProject + README.MD = README.MD + .gitignore = .gitignore + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FarmmapsHerbicide", "FarmmapsHerbicide\FarmmapsHerbicide.csproj", "{731A88CD-9DC4-4969-86F2-2315830A6998}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FarmmapsHaulmkilling", "FarmmapsHaulmkilling\FarmmapsHaulmkilling.csproj", "{DFA89D0B-5400-4374-B824-8367B76B4B6E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -30,5 +33,9 @@ Global {731A88CD-9DC4-4969-86F2-2315830A6998}.Debug|Any CPU.Build.0 = Debug|Any CPU {731A88CD-9DC4-4969-86F2-2315830A6998}.Release|Any CPU.ActiveCfg = Release|Any CPU {731A88CD-9DC4-4969-86F2-2315830A6998}.Release|Any CPU.Build.0 = Release|Any CPU + {DFA89D0B-5400-4374-B824-8367B76B4B6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DFA89D0B-5400-4374-B824-8367B76B4B6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DFA89D0B-5400-4374-B824-8367B76B4B6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DFA89D0B-5400-4374-B824-8367B76B4B6E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/FarmmapsHaulmkilling/FarmmapsHaulmkilling.csproj b/FarmmapsHaulmkilling/FarmmapsHaulmkilling.csproj new file mode 100644 index 0000000..bd82357 --- /dev/null +++ b/FarmmapsHaulmkilling/FarmmapsHaulmkilling.csproj @@ -0,0 +1,20 @@ + + + + Exe + netcoreapp3.0 + + + + + Always + + + Always + + + + + + + diff --git a/FarmmapsHaulmkilling/HaulmkillingApplication.cs b/FarmmapsHaulmkilling/HaulmkillingApplication.cs new file mode 100644 index 0000000..1496182 --- /dev/null +++ b/FarmmapsHaulmkilling/HaulmkillingApplication.cs @@ -0,0 +1,13 @@ +using System.Threading.Tasks; +using FarmmapsApi; + +namespace FarmmapsHaulmkilling +{ + public class HaulmkillingApplication : IApplication + { + public Task RunAsync() + { + throw new System.NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/FarmmapsHaulmkilling/HaulmkillingService.cs b/FarmmapsHaulmkilling/HaulmkillingService.cs new file mode 100644 index 0000000..65bea78 --- /dev/null +++ b/FarmmapsHaulmkilling/HaulmkillingService.cs @@ -0,0 +1,7 @@ +namespace FarmmapsHaulmkilling +{ + public class HaulmkillingService + { + + } +} \ No newline at end of file diff --git a/FarmmapsHaulmkilling/Program.cs b/FarmmapsHaulmkilling/Program.cs new file mode 100644 index 0000000..080fcd6 --- /dev/null +++ b/FarmmapsHaulmkilling/Program.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using FarmmapsApi; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; + +namespace FarmmapsHaulmkilling +{ + class Program : FarmmapsProgram + { + private static async Task Main(string[] args) + { + await new Program().Start(args); + } + + protected override void Configure(IServiceCollection serviceCollection) + { + serviceCollection.AddLogging(opts => opts + .AddConsole() + .AddFilter("System.Net.Http", LogLevel.Warning)) + .AddTransient(); + } + } +} diff --git a/FarmmapsHaulmkilling/appsettings.json b/FarmmapsHaulmkilling/appsettings.json new file mode 100644 index 0000000..3896303 --- /dev/null +++ b/FarmmapsHaulmkilling/appsettings.json @@ -0,0 +1,10 @@ +{ + "Authority": "https://accounts.farmmaps.awtest.nl/", + "Endpoint": "http://farmmaps.awtest.nl", + "BasePath": "api/v1", + "DiscoveryEndpointUrl": "https://accounts.farmmaps.awtest.nl/.well-known/openid-configuration", + "RedirectUri": "http://example.nl/api", + "ClientId": "", + "ClientSecret": "", + "Scopes": ["api"] +} \ No newline at end of file