Skip to content

Commit

Permalink
Switch to class library ASP refernce
Browse files Browse the repository at this point in the history
  • Loading branch information
Toxantron committed Sep 20, 2021
1 parent 14c2a28 commit 7a3545b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
9 changes: 6 additions & 3 deletions src/Moryx.Runtime.Kestrel/Moryx.Runtime.Kestrel.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Kestrel support for Moryx</Description>
<CreatePackage>true</CreatePackage>
<PackageTags>MORYX;Runtime;Server</PackageTags>
<OutputType>Library</OutputType>
<OpenApiGenerateDocuments>false</OpenApiGenerateDocuments>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Castle.Windsor.Extensions.DependencyInjection" Version="5.1.1" />
</ItemGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Moryx\Moryx.csproj" />
</ItemGroup>
Expand Down
5 changes: 0 additions & 5 deletions src/Moryx.Runtime.Kestrel/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.ApplicationParts;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Moryx.Configuration;

namespace Moryx.Runtime.Kestrel
{
Expand Down
5 changes: 1 addition & 4 deletions src/Moryx.Runtime.Kestrel/VersionController.cs
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Moryx.Communication.Endpoints;
using Moryx.Container;

namespace Moryx.Runtime.Kestrel
{
[ApiController, Route("endpoints")]
[Produces("application/json")]
public class VersionController : Controller
{
public EndpointCollector Collector { get; set; }

[HttpGet]
[Produces("application/json")]
public Endpoint[] AllEndpoints()
{
return Collector.AllEndpoints;
}

[HttpGet("service/{service}")]
[Produces("application/json")]
public Endpoint[] FilteredEndpoints(string service)
{
return Collector.AllEndpoints.Where(e => e.Service == service).ToArray();
}

[HttpGet("endpoint/{endpoint}")]
[Produces("application/json")]
public Endpoint GetEndpointConfig(string endpoint)
{
return Collector.AllEndpoints.FirstOrDefault(e => e.Path == endpoint);
Expand Down
6 changes: 5 additions & 1 deletion src/Moryx.TestModule.Kestrel/Moryx.TestModule.Kestrel.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0</TargetFrameworks>
Expand All @@ -10,6 +10,10 @@
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Moryx\Moryx.csproj" />
<ProjectReference Include="..\Moryx.Runtime\Moryx.Runtime.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion src/StartProject.Core/StartProject.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
Expand Down

0 comments on commit 7a3545b

Please sign in to comment.