Created
January 22, 2010 20:14
-
-
Save kkozmic/284088 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConcreteLoader : ILazyComponentLoader | |
{ | |
public IRegistration Load(string key, Type service) | |
{ | |
// to make sure it really is concrete type | |
if (!(service.IsClass&&service.IsAbstract==false)) | |
{ | |
return null; | |
} | |
return Component.For(service).Named(key); | |
} | |
} | |
// and you just register the loader in the container. That's all | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment