Skip to content

Fix Http MinimalSample #49174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/Http/samples/MinimalSample/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics;
using System.Reflection;
using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.AspNetCore.Http.Metadata;
Expand All @@ -10,7 +9,7 @@
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.Logger.LogInformation($"Current process ID: {Process.GetCurrentProcess().Id}");
app.Logger.LogInformation($"Current process ID: {Environment.ProcessId}");

string Plaintext() => "Hello, World!";
app.MapGet("/plaintext", Plaintext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ internal static void AddMvcCoreServices(IServiceCollection services)
//
// Action Invoker
//
// The IActionInvokerFactory is cachable
// The IActionInvokerFactory is cacheable
services.TryAddSingleton<IActionInvokerFactory, ActionInvokerFactory>();
services.TryAddEnumerable(
ServiceDescriptor.Transient<IActionInvokerProvider, ControllerActionInvokerProvider>());
Expand Down