Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Foo {
- public ServiceProvider Provider = new ServiceProvider();
- public Foo() {
- Provider.AddService(new Singleton());
- new Bar(Provider);
- }
- };
- public class Bar {
- public Bar(ServiceProvider provider) {
- Singleton singleton = provider.GetService(typeof(Singleton));
- }
- };
Add Comment
Please, Sign In to add comment