private FurnitureManufacturerEngine(ICompanyFactory companyFactory, IFurnitureFactory furnitureFactory, IDataBase database, IRenderer renderer) { this.companyFactory = companyFactory; this.furnitureFactory = furnitureFactory; this.database = database; this.renderer = renderer; }
/// <summary> /// Aplicación principal. /// </summary> public void Main() { Console.WriteLine("\n*************** BRIDGE ***************"); Console.WriteLine("Ingrese nombre del producto"); string producto = Console.ReadLine()?.ToUpperInvariant(); Console.WriteLine("\nSeleccione la paquetería de su preferencia." + "\n1-DHL \n2-Fedex \n3-Estafeta"); int option = Convert.ToInt32(Console.ReadLine()); ICompanyFactory companyFactory = SelectCompanyFactory(option); if (companyFactory == null) { return; } ICompany company = companyFactory.CrearInstancia(); Menu menu = new Menu(company); ITransport transport = menu.SelectTransport(); ParcelService parcelService = new ParcelService(transport); parcelService.SendProduct(producto); }
public CompanyService(ICompanyQuery companyQuery, ICompanyRepository companyRepository, ICompanyValidator companyValidator, ICompanyFactory companyFactory) { _companyQuery = companyQuery; _companyRepository = companyRepository; _companyValidator = companyValidator; _companyFactory = companyFactory; }
public CompanyApplicationService(ICompanyRepository repository, ICompanyFactory factory, ILocationService locationService, IIdentityResolver identityResolver, IDomainNotificationHandler domainNotificationHandler, IUnitOfWork <ILedgerCompanyDbAbstraction> unitOfWork, IIntegrationServiceBus integrationBus) : base(domainNotificationHandler, unitOfWork, integrationBus) { _repository = repository; _factory = factory; _locationService = locationService; _identityResolver = identityResolver; }
public RegisterNewCompanyCommand(ICompanyFactory factory, Notification notification, ICompanyRepository companies) { this.factory = factory; this.notification = notification; this.companies = companies; }
public CreateCompanyCommand(ICompaniesRepository repository, ICompanyFactory factory, IUnitOfWork unitOfWork) { _repository = repository; _factory = factory; _unitOfWork = unitOfWork; }
private FurnitureManufacturerEngine() { this.companyFactory = new CompanyFactory(); this.furnitureFactory = new FurnitureFactory(); this.companies = new Dictionary <string, ICompany>(); this.furnitures = new Dictionary <string, IFurniture>(); this.renderer = new ConsoleRenderer(); }
public CompanyController( ICompanyRepository repository, ICompanyFactory factory ) { _repository = repository; _factory = factory; }
private FurnitureManufacturerEngine() { this.companyFactory = new CompanyFactory(); this.furnitureFactory = new FurnitureFactory(); this.companies = new Dictionary<string, ICompany>(); this.furnitures = new Dictionary<string, IFurniture>(); this.renderer = new ConsoleRenderer(); }
public AddCompanyHandler( ICompanyFactory companyFactory, ICompanyRepository companyRepository, ICompanyDtoBuilder companyDtoBuilder) { this.companyFactory = companyFactory; this.companyRepository = companyRepository; this.companyDtoBuilder = companyDtoBuilder; }
public CompanyRepository( IContextFactory <Data.Contexts.FinancialContext> contextFactory, ICompanyFactory companyFactory, ICompanyEntityFactory entityFactory) { _contextFactory = contextFactory; _companyFactory = companyFactory; _entityFactory = entityFactory; }
public CompanyService( ICompanySearchService companySearchService, IAnnualReportService annualReportService, IScoreService scoreService, ICompanyFactory companyFactory) { this.companySearchService = companySearchService; this.annualReportService = annualReportService; this.scoreService = scoreService; this.companyFactory = companyFactory; }
// dependency injection public FurnitureManufacturerEngine ( ICompanyFactory companyFactory, IFurnitureFactory furnitureFactory, IRenderer renderer ) { this.companyFactory = companyFactory; this.furnitureFactory = furnitureFactory; this.renderer = renderer; this.companies = new Dictionary <string, ICompany>(); this.furnitures = new Dictionary <string, IFurniture>(); }
internal static string CreateCompanyMethod(string name, string registrationNumber, ICompanyFactory companyFactory, IDictionary <string, ICompany> companies) { if (companies.ContainsKey(name)) { return(string.Format(EngineConstants.CompanyExistsErrorMessage, name)); } var company = companyFactory.CreateCompany(name, registrationNumber); companies.Add(name, company); return(string.Format(EngineConstants.CompanyCreatedSuccessMessage, name)); }
public CompanyRepository(CompanyContext companyContext, ICompanyFactory companyFactory) { this.store = companyContext; this.companyFactory = companyFactory; mapper = new CompanyMapper(); }
public CalculateController(ICompanyFactory companyFactory) { _companyFactory = companyFactory; }
public CalculatorService(ICompanyFactory companyFactory) : this(companyFactory, null) { }
public CalculatorService(ICompanyFactory companyFactory, Func <string, IShipCompany> serviceResolver) { _companyFactory = companyFactory; _shipCompany = serviceResolver?.Invoke("postoffice"); }
public CreateCompanyCommand(IDataStore data, ICompanyFactory factory, Constants constants) { this.data = data; this.factory = factory; this.constants = constants; }
public CreateCompanyCommand(IDataStore dataStore, ICompanyFactory companyFactory) { this.dataStore = dataStore; this.companyFactory = companyFactory; }
public CreateCompany(ICompanyFactory companyFactory, ICompanyRepository companyRepository) { this.companyFactory = companyFactory; this.companyRepository = companyRepository; }
public CompanyController(ICompanyFactory factory) { _factory = factory; }
public CompanyService(ICompaniesRepository repository, ICompanyFactory factory) { _repository = repository; _factory = factory; }