You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A given type may match more than once when using convention registrations (i.e. typeof(IDisposable) and separately, by regex).
Ideally there should be no overlap for the same concrete type, as that may cause weird lifetime bugs due to the first one to register the implementation type to "win" (since we use TryAddXXX). So it should be a warning to have a case where this happens.
The text was updated successfully, but these errors were encountered:
kzu
changed the title
Add analyzer that detects inconsistent lifetime registrations in conventions
Report inconsistent lifetime registrations in conventions
Dec 4, 2024
A given type may match more than once when using convention registrations (i.e.
typeof(IDisposable)
and separately, by regex).Ideally there should be no overlap for the same concrete type, as that may cause weird lifetime bugs due to the first one to register the implementation type to "win" (since we use TryAddXXX). So it should be a warning to have a case where this happens.
The text was updated successfully, but these errors were encountered: