Created separate project for herbicide
This commit is contained in:
parent
70a77f3472
commit
cd7d1b3096
@ -10,6 +10,8 @@ ProjectSection(SolutionItems) = preProject
|
|||||||
.gitignore = .gitignore
|
.gitignore = .gitignore
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FarmmapsHerbicide", "FarmmapsHerbicide\FarmmapsHerbicide.csproj", "{731A88CD-9DC4-4969-86F2-2315830A6998}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -24,5 +26,9 @@ Global
|
|||||||
{1FA9E50B-F45E-4534-953A-37C783D03C74}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{1FA9E50B-F45E-4534-953A-37C783D03C74}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{1FA9E50B-F45E-4534-953A-37C783D03C74}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{1FA9E50B-F45E-4534-953A-37C783D03C74}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{1FA9E50B-F45E-4534-953A-37C783D03C74}.Release|Any CPU.Build.0 = Release|Any CPU
|
{1FA9E50B-F45E-4534-953A-37C783D03C74}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{731A88CD-9DC4-4969-86F2-2315830A6998}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{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
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
20
FarmmapsHerbicide/FarmmapsHerbicide.csproj
Normal file
20
FarmmapsHerbicide/FarmmapsHerbicide.csproj
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="appsettings.json">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="Data\**\*">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\FarmmapsApi\FarmmapsApi.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
31
FarmmapsHerbicide/HerbicideApplication.cs
Normal file
31
FarmmapsHerbicide/HerbicideApplication.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using FarmmapsApi;
|
||||||
|
using FarmmapsApi.Services;
|
||||||
|
using FarmmapsApiSamples;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace FarmmapsHerbicide
|
||||||
|
{
|
||||||
|
public class HerbicideApplication : IApplication
|
||||||
|
{
|
||||||
|
private const string DownloadFolder = "Downloads";
|
||||||
|
|
||||||
|
private readonly ILogger<HerbicideApplication> _logger;
|
||||||
|
private readonly FarmmapsApiService _farmmapsApiService;
|
||||||
|
private readonly HerbicideService _herbicideService;
|
||||||
|
private readonly GeneralService _generalService;
|
||||||
|
|
||||||
|
public HerbicideApplication(ILogger<HerbicideApplication> logger, FarmmapsApiService farmmapsApiService,
|
||||||
|
GeneralService generalService, HerbicideService herbicideService)
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
_farmmapsApiService = farmmapsApiService;
|
||||||
|
_generalService = generalService;
|
||||||
|
_herbicideService = herbicideService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task RunAsync()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
24
FarmmapsHerbicide/Program.cs
Normal file
24
FarmmapsHerbicide/Program.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using FarmmapsApi;
|
||||||
|
using FarmmapsApiSamples;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace FarmmapsHerbicide
|
||||||
|
{
|
||||||
|
class Program : FarmmapsProgram<HerbicideApplication>
|
||||||
|
{
|
||||||
|
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<HerbicideService>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
FarmmapsHerbicide/appsettings.json
Normal file
10
FarmmapsHerbicide/appsettings.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"Authority": "https://accounts.farmmaps.awtest.nl/",
|
||||||
|
"Endpoint": "https://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"]
|
||||||
|
}
|
@ -6,7 +6,7 @@ using FarmmapsApi;
|
|||||||
using FarmmapsApi.Services;
|
using FarmmapsApi.Services;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace FarmmapsApiSamples
|
namespace FarmmapsNbs
|
||||||
{
|
{
|
||||||
public class NbsApplication : IApplication
|
public class NbsApplication : IApplication
|
||||||
{
|
{
|
||||||
@ -14,7 +14,6 @@ namespace FarmmapsApiSamples
|
|||||||
|
|
||||||
private readonly ILogger<NbsApplication> _logger;
|
private readonly ILogger<NbsApplication> _logger;
|
||||||
private readonly FarmmapsApiService _farmmapsApiService;
|
private readonly FarmmapsApiService _farmmapsApiService;
|
||||||
private readonly FarmmapsEventHub _farmmapsEventHub;
|
|
||||||
private readonly NitrogenService _nitrogenService;
|
private readonly NitrogenService _nitrogenService;
|
||||||
private readonly GeneralService _generalService;
|
private readonly GeneralService _generalService;
|
||||||
|
|
||||||
|
@ -1,17 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using FarmmapsApi.Models;
|
using FarmmapsApi.Models;
|
||||||
using FarmmapsApi.Services;
|
using FarmmapsApi.Services;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using static FarmmapsApi.Extensions;
|
using static FarmmapsApi.Extensions;
|
||||||
using static FarmmapsApiSamples.Constants;
|
using static FarmmapsApiSamples.Constants;
|
||||||
|
|
||||||
namespace FarmmapsApiSamples
|
namespace FarmmapsNbs
|
||||||
{
|
{
|
||||||
public class NitrogenService
|
public class NitrogenService
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@ using FarmmapsApi;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace FarmmapsApiSamples
|
namespace FarmmapsNbs
|
||||||
{
|
{
|
||||||
class Program : FarmmapsProgram<NbsApplication>
|
class Program : FarmmapsProgram<NbsApplication>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user