ipjohnson / Grace

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

how can I known if a serviceType has been registered? #135

Closed suningnet closed 6 years ago

suningnet commented 6 years ago

Is there any function like container.IsRegistered(type(MyServiceType))? I need to have a check

ipjohnson commented 6 years ago

@suningnet CanLocate will act similar. There is also IsExported which is available during configuration

suningnet commented 6 years ago

thanks a lot! I'll have a try..

ipjohnson commented 6 years ago

I'm going to close this as completed.