Guest User

Untitled

a guest
May 25th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public class FooAttribute : Attribute {}
  2. public class BarAttribute : Attribute {}
  3.  
  4. public interface IA { ... }
  5.  
  6. [Foo]
  7. public class FooA : IA { ... }
  8.  
  9. [Bar]
  10. public class BarA : IA { ... }
  11.  
  12. public class B {
  13. public B([Foo] IA one, [Bar] IA two) {
  14. Assert.That(one is FooA);
  15. Assert.That(two is BarA);
  16. }
  17. }
  18.  
  19. Bind<IA>().To<FooA>();
  20. Bind<IA>().To<BarA>();
Add Comment
Please, Sign In to add comment