Skip to content

Conversation

@colderlord
Copy link

Throw error when recurcive resolving + stack
Removed setter in Resolve func

@markjackmilian
Copy link
Collaborator

Hi, thank you for your contribution. I will integrate your changes as soon as possible, but can you tell me how your changes improve this project? thanks

@colderlord
Copy link
Author

Hello!
Are you talking about only this changes or about this + previouse changes?
I think, my changes make this project better, for example, if i have recoucieve resolving types better if i see friendly error and this error will throw faster than if the call stack is full.
I think my changes will give more freedom when using Bridge.Ioc. and this library becomes more flexible.
After all it's your project and you can check changes and approve them or decline :)
Thank you!

@colderlord colderlord force-pushed the develop branch 3 times, most recently from 9117984 to 8a26f27 Compare November 7, 2017 12:08
@colderlord
Copy link
Author

Hello!
I commit some changes.
first of all i fix 2 bugs:

  1. fix in method RegisterInstance(TType instance)
  2. the second error was due of using static field in SingleInstanceResolver

And i think my 1st changes ruin your logic...
In our project we need to use reflection and register some Types when application starts and we dont know real Type that we register. Thats why i create PR without generic.

Please tell me about logic in your library: You need single instance type in each container or single instance type in application?

@markjackmilian
Copy link
Collaborator

Hi!
I already fix the first issue here:
841011a
in version 1.0.2 is already fixed.
Can you give me some details about the second issue?

For your app logic you can use:
public void RegisterInstance(object instance);
so the type of the instance is registered.

For "my" logic i can use
public void RegisterInstance(object instance);
so the type of generic is registered.

Do you agree?

Thanks for your contribution

@colderlord
Copy link
Author

About the second issue:
in SingleInstanceResolver you have static field
private static object _singleInstance;
and now if you register many types as SingleInstance you will receive only first when resolver calls.
In this commit i change field _singleInstance to private object _singleInstance;.

I think you should check my changes thoroughly. Could you write deeper tests in your test project to check Resolvers?

@markjackmilian
Copy link
Collaborator

hello, I agree on the need for more in-depth tests, I hope to be able to do them soon.
I agree with what you said and i believe that your modification is correct.
I will integrate tests and modifications as soon as possible.
thank you

@colderlord
Copy link
Author

Hello!
I add Lazy resolving and i add test that describes how it's works

@markjackmilian
Copy link
Collaborator

very interesting! this weekend I look at it and I will integrate it on master! Thanks!

@colderlord
Copy link
Author

i removed Lazy resolving )))
we will add it in our project.

@colderlord colderlord force-pushed the develop branch 3 times, most recently from 12fc903 to 017201d Compare December 27, 2017 13:53
@colderlord
Copy link
Author

Hello!
I relove conflits.
Please check it out and tell something))

@markjackmilian
Copy link
Collaborator

i'm working on another project at the moment. i'll be back on this project in few days

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