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
| services.AddTransient<IShapeFactory<Rectangle>, RectangleFactory>(); | |
| services.AddTransient<IShapeFactory<Circle>, CircleFactory>(); |
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
| private readonly ICustomers _service; | |
| public Client() | |
| { | |
| //Al estar accesibles de forma pública las implementaciones, un programador "despistado" | |
| //podría saltarse el flujo de inversión de control y crear los objetos "a mano" mediante new | |
| this._service = new Customers(new CustomerRepository()); | |
| } |
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 Machine | |
| { | |
| public Machine() | |
| { | |
| } | |
| private string Components { get; set; } | |
| public List<string> GetComponents() | |
| { |
OlderNewer