Closed SergeiPavlov closed 6 months ago
@SergeiPavlov, I'm going to make new GetSingleConstructorInvokerOrDefault
/GetSingleConstructorInvoker
methods internal. Are you ok with that?
I'm Ok, but what about GetSingleConstructorOrDefault()
?
It is public but conditionally available only on <.NET8
Well, it is public and correct way of getting it out of public is to make it obsolete and then make it internal. It is a single-usage method. Probably, it will be deleted after NET6 and NET7 will be removed from project target frameworks. For now, all I can do is to make it obsolete to hint the future for possible users.
BTW, I'll make it exist in NET8 too to prevent possible compilation error on user side on framework upgrade, another reason is that ConstructorInvoker and ConstructorInfo are not interchangeable.
Described here: https://github.com/dotnet/runtime/pull/88415 https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-8#reflection