Skip to content

Apply .NET8 MethodInvoker/ConstructorInvoker optimization #359

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

Conversation

SergeiPavlov
Copy link
Contributor

* Apply .NET8 MethodInvoker optimization

* Remove unused line

* Use ConstructorInvoker

* Simplify conditionallly-compiled code
@alex-kulakov alex-kulakov merged commit ccbcd4a into DataObjects-NET:master Dec 21, 2023
@alex-kulakov
Copy link
Contributor

@SergeiPavlov, I'm going to make new GetSingleConstructorInvokerOrDefault/GetSingleConstructorInvoker methods internal. Are you ok with that?

@SergeiPavlov
Copy link
Contributor Author

I'm Ok, but what about GetSingleConstructorOrDefault() ?
It is public but conditionally available only on <.NET8

@alex-kulakov
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants