ipjohnson / Grace

Grace is a feature rich dependency injection container library
MIT License
336 stars 33 forks source link

[Bug] Behavior 'AllowInjectionScopeLocation' doesn't work with 'ConstructorSelectionMethod.Dynamic' behavior #171

Closed mcdis closed 6 years ago

mcdis commented 6 years ago

test:

class Q
{
  public Q(IInjectionScope _scope) {}
}
var container = new DependencyInjectionContainer(_ =>
{
  _.Behaviors.ConstructorSelection = ConstructorSelectionMethod.Dynamic;
  _.Behaviors.AllowInjectionScopeLocation = true;
});
var q = container.Locate<Q>();
ipjohnson commented 6 years ago

That does sound like a bug. I’ll see if I can find some time to look at this in the next few days.

ipjohnson commented 6 years ago

I've checked in a change for this issue. I have one more thing that I want to address for version 6.4.0. I'll try and get a new version out to nuget this weekend. Till then you can try the nightly nuget feed below

https://ci.appveyor.com/nuget/grace-master

ipjohnson commented 6 years ago

I've released 6.4.0-RC685 with this fix