ipjohnson / Grace

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

ConstructorSelectionMethod.Dynamic and IDisposable object locate bug #188

Closed mcdis closed 5 years ago

mcdis commented 5 years ago
interface IA {  }
class A : IA,IDisposable
{
   public void Dispose() { }
}
void Main()
{
  var s = new DependencyInjectionContainer(_ =>
  {
    _.Behaviors.ConstructorSelection = ConstructorSelectionMethod.Dynamic;  // <--without OK
   });
   s.Configure(_=>_.ExportAs<A,IA>().Lifestyle.Singleton());
   s.Locate<IA>(); // <-- exception
}
System.ArgumentException, 
Example.A AddDisposable[A](Example.A)
mcdis commented 5 years ago

Yeah! Ready...Steady...Go! Waiting for [minor] release

ipjohnson commented 5 years ago

I’m planning on doing a preview release this evening