This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net5.0</TargetFramework> | |
+ <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles> | |
+ <CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)Generated</CompilerGeneratedFilesOutputPath> | |
</PropertyGroup> | |
<ItemGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Infer | |
on: | |
push: | |
env: | |
project: MyApp | |
jobs: | |
build: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using System.Reflection; | |
GetResource1("MyApp.Program.cs"); | |
GetResource2("MyApp.Program.cs"); | |
ReadFile(); | |
static string GetResource1(string path) { | |
var asm = Assembly.GetEntryAssembly(); | |
var stream = asm.GetManifestResourceStream(path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http http: //localhost/hello/v2/2 | |
HTTP/1.1 200 OK | |
Content-Length: 5 | |
Content-Type: text/plain; charset=utf-8 | |
Date: Sun, | |
29 Nov 2020 07: 15: 01 GMT | |
Server: Kestrel | |
Hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Routes": [ | |
{ | |
"DownstreamPathTemplate": "/api/hello/hi/{delay}", | |
"DownstreamScheme": "http", | |
"DownstreamHostAndPorts": [ | |
{ | |
"Host": "web", | |
"Port": 80 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http http://localhost/hello/v1/2 | |
HTTP/1.1 499 | |
Content-Length: 0 | |
Date: Sun, 29 Nov 2020 06:51:47 GMT | |
Server: Kestrel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http http://localhost/hello/v1/1 | |
HTTP/1.1 200 OK | |
Content-Length: 5 | |
Content-Type: text/plain; charset=utf-8 | |
Date: Sun, 29 Nov 2020 06:49:04 GMT | |
Server: Kestrel | |
Hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Routes": [ | |
{ | |
"DownstreamPathTemplate": "/api/hello/hi/{delay}", | |
"DownstreamScheme": "http", | |
"DownstreamHostAndPorts": [ | |
{ | |
"Host": "web", | |
"Port": 80 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Logging; | |
namespace MyWeb.Controllers.Hello { | |
[ApiController] | |
[Route("api/[controller]/[action]")] | |
public class HelloController : ControllerBase { | |
private readonly ILogger<HelloController> _logger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯❯❯ dotnet build src/MyWindowsWeb -r win7-x64 -f netcoreapp2.1 /p:TargetLatestRuntimePatch=true | |
Microsoft (R) Build Engine version 16.8.0+126527ff1 for .NET | |
Copyright (C) Microsoft Corporation. All rights reserved. | |
Determining projects to restore... | |
All projects are up-to-date for restore. | |
MyWeb -> /Users/wk/Source/net-sdk-1061/src/MyWeb/bin/Debug/netcoreapp2.1/MyWeb.dll | |
MyWindowsWeb -> /Users/wk/Source/net-sdk-1061/src/MyWindowsWeb/bin/Debug/netcoreapp2.1/win7-x64/MyWindowsWeb.dll |