question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ambiguous Map method with Minimal

See original GitHub issue

Proposed API

Add a new Map overload to remove ambiguity caused by implicit conversion from PathString:

namespace Microsoft.AspNetCore.Builder
{
    public static class MapExtensions
    {
+        public static IApplicationBuilder Map(this IApplicationBuilder app, string pathMatch, Action<IApplicationBuilder> configuration)

Original Issue

When using minimal there is ambiguity when using app.Map("/", builder => {}); between IApplicationBuilder Map(this IApplicationBuilder app, PathString pathMatch, Action<IApplicationBuilder> configuration) https://github.com/dotnet/aspnetcore/blob/ff51fd7105a9003841215f1f3b0b8fc9e2998a67/src/Http/Http.Abstractions/src/Extensions/MapExtensions.cs#L23 and public static MinimalActionEndpointConventionBuilder Map(this IEndpointRouteBuilder endpoints, string pattern, Delegate action) https://github.com/dotnet/aspnetcore/blob/ff51fd7105a9003841215f1f3b0b8fc9e2998a67/src/Http/Routing/src/Builder/MinimalActionEndpointRouteBuilderExtensions.cs#L123

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
davidfowlcommented, Aug 18, 2021
1reaction
halter73commented, Aug 18, 2021

I reopened https://github.com/dotnet/roslyn/issues/55691 because there’s still some weirdness there if you specify IApplicationBuilder as the parameter type in the lambda, but I think the main scenario where the parameter type is unspecified (or specified to be anything other than IApplicationBuilder) is addressed, so I’ll leave this closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Mapstruct: Ambiguous mapping methods found for ...
It seems like there are new methods added in Spring Data that can be used to map from Short to TypeB and thus...
Read more >
What is Ambiguous Mapping in Spring?
Spring is a loosely coupled framework of java meaning all the objects are not dependent on each other and can be easily managed...
Read more >
Country Mapping shows as ambiguous for odd countries.
Country Mapping shows as ambiguous for odd countries. I've set the Country to use the ISO standard but I still get ambiguous for...
Read more >
Frequently Asked Questions (FAQ)
MapStruct reports this as “ambiguous mapping method” and lists the methods from which it cannot make a selection. Here, you have to guide...
Read more >
METHODS FOR ALLOCATING AMBIGUOUS SHORT- ...
First, they align their reads to the reference genome, using parameters which return an exact best match, if one exists, or a list...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found