ipjohnson / Grace

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

Question: #132

Closed canhazcodez closed 6 years ago

canhazcodez commented 6 years ago

This is not an issue as much as it is a question for the moment. Can the ClearExports method only be used inside the same Configure context as the other exports have been declared?

di.Configure(c => { 
    c.Export<X>().As<IX>();
    c.Export<Y>().As<IY>();
});
di.Configure( c2 => { c2.ClearExports(); });  // this doesn't seem to change anything

registring exports on multiple configure calls seems to work, though.

ipjohnson commented 6 years ago

@ElMaxxi ClearExports clears the exports from the current registration block it does not clear all exports. The xmldoc says this on the method Clears exports from registration block

The original issue can be found here