unitycontainer / registration-by-convention

Unity.RegistrationByConvention package (Requires Core Implementation. Any contributors?)
Apache License 2.0
4 stars 12 forks source link

RegisterTypes extension expects LifetimeManager instead of ITypeLifetimeManager #12

Closed HannoZ closed 5 years ago

HannoZ commented 5 years ago

I'm currently working on an upgrade from Unity 3.5 to latest Unity 5.9.x (which is quite a challenge) One of the remaining issues that I have is that the RegisterTypes extension method is used in a few places. First I was glad to find out that it was moved to a separate package, but then I found out that it was using the LifetimeManager, instead of ITypeLifetimeManager that is used now in the standard RegisterType method. The problem is that the lifetime manager is passed a parameter and I had to change the type to ITypeLifetimeManager for all the regular registrations to compile. So the request is to change signature (or create an overload) of the RegisterTypes extension method to accept ITypeLifetimeManager instead of LifetimeManager

ENikS commented 5 years ago

Why don't you make a pull request?

I could try and change it based on your description but it would be better, and much faster if you do it yourself. I am not that big on registrations by convention and have only limited experience with it.

HannoZ commented 5 years ago

I tried to do it, but either I'm doing it wrong, or I don't have the rights (I get a 403 error message trying to create a branch, or pushing changes to the 5.x branch. (I've never used Git to submit changes before..)

ENikS commented 5 years ago

You need tp fork the repo and do changes in that fork. Once done, create a pull request. Google for the manual

ENikS commented 5 years ago

Released 5.9.2