IsNullOrEmpty(this IEnumerable) extension method in public API causes CS0121 ambiguity for consumers #499
-
|
Duende.IdentityServer.Extensions.IEnumerableExtensions exposes a public IsNullOrEmpty extension method on IEnumerable. This is a very common utility method name, and any consumer library that defines its own IsNullOrEmpty(this IEnumerable) (or references one from another package) gets CS0121: The call is ambiguous compilation errors whenever both namespaces are imported. The using Duende.IdentityServer.Extensions directive can't simply be removed because it provides other essential extensions like IsAuthenticated() and GetSubjectId() on ClaimsPrincipal. Suggested fix: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi @scholarrx-pelka . Fair ask. Don't think think that particular item should be on the public API going forward, so we'll internalize it. As that's a breaking API change, it'll be on next major version. |
Beta Was this translation helpful? Give feedback.
Hi @scholarrx-pelka . Fair ask. Don't think think that particular item should be on the public API going forward, so we'll internalize it. As that's a breaking API change, it'll be on next major version.