Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. public interface IOperations {
  2.  
  3. }
  4. public interface ICatalog : IOperations {
  5.  
  6. }
  7. public interface IAdmin : ICatalog {
  8.  
  9. }
  10.  
  11. public interface ICatalogService : IAdmin, ISomethingElse {
  12. }
  13.  
  14. public void ConfigureServices(IServiceCollection services) {
  15. services.AddMvc();
  16. ICatalogService catalogService = new SomeConcreteService();
  17. services.AddSingleton(catalogService);
  18. }
  19.  
  20. public class CatalogController:Controller
  21. {
  22. private IOperations operations;
  23. public CatalogController(IOperations ops)
  24. {
  25. this.operations=ops;
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement