SHARE
TWEET

Untitled

a guest Jun 18th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top