public Client(string name, string address, string uniqueNumber, IValidateModel modelValidator) : base(name, address, uniqueNumber) { this.modelValidator = modelValidator; this.dueDaysAllowed = 5; this.discount = 0; this.vehicles = new List <IVehicle>(); }
public IVehicle CreateTruck(string model, string make, string registrationNumber, string year, EngineType engine, int weightAllowedInKilograms, IValidateModel modelValidator) { IVehicle newTruck = new Truck(model, make, registrationNumber, year, engine, weightAllowedInKilograms, modelValidator); return(newTruck); }
public IssueInvoices(IDatabase database, IValidateCore coreValidator, IValidateModel modelValidator, IWriter writer) { this.database = database ?? throw new ArgumentNullException(); this.coreValidator = coreValidator ?? throw new ArgumentNullException(); this.modelValidator = modelValidator ?? throw new ArgumentNullException(); this.writer = writer; }
public HireEmployee(IAutoServiceFactory autoServiceFactory, IDatabase database, IValidateCore coreValidator, IWriter writer, IValidateModel modelValidator) { this.database = database ?? throw new ArgumentNullException(); this.autoServiceFactory = autoServiceFactory ?? throw new ArgumentNullException(); this.coreValidator = coreValidator ?? throw new ArgumentNullException(); this.writer = writer ?? throw new ArgumentNullException(); this.modelValidator = modelValidator ?? throw new ArgumentNullException(); }
public AddVehicleToClient(IDatabase database, IWriter writer, IValidateCore coreValidator, IAutoServiceFactory factory, IValidateModel modelValidator) { this.database = database ?? throw new ArgumentNullException(); this.writer = writer ?? throw new ArgumentNullException(); this.coreValidator = coreValidator ?? throw new ArgumentNullException(); this.modelValidator = modelValidator ?? throw new ArgumentNullException(); this.factory = factory ?? throw new ArgumentNullException(); }
//Initialize the singleInstance objects that are used in the methods //properties not needed for now public StockManager(IProcessorLocator processorLocator) { if (processorLocator == null) { throw new ArgumentNullException(); } this.database = processorLocator.GetProcessor <IDatabase>() ?? throw new ArgumentNullException(); this.modelValidator = processorLocator.GetProcessor <IValidateModel>() ?? throw new ArgumentNullException(); }
public SellStockToClientVehicle(IAutoServiceFactory autoServiceFactory, IDatabase database, IValidateCore coreValidator, IWriter writer, IStockManager stockManager, IValidateModel modelValidator) { this.database = database ?? throw new ArgumentNullException(); this.coreValidator = coreValidator ?? throw new ArgumentNullException(); this.writer = writer ?? throw new ArgumentNullException(); this.stockManager = stockManager ?? throw new ArgumentNullException(); this.autoServiceFactory = autoServiceFactory ?? throw new ArgumentNullException(); this.modelValidator = modelValidator ?? throw new ArgumentNullException(); }
public Invoice(string number, DateTime date, IClient client, IValidateModel modelValidator) { this.modelValidator = modelValidator; this.ModelValidator.StringForNullEmpty(number); this.ModelValidator.CheckNullObject(client); this.number = number; this.client = client; this.date = date; this.invoiceItems = new List <ISell>(); }
public IssueInvoices(IProcessorLocator processorLocator) { if (processorLocator == null) { throw new ArgumentNullException(); } this.database = processorLocator.GetProcessor <IDatabase>() ?? throw new ArgumentNullException(); this.coreValidator = processorLocator.GetProcessor <IValidateCore>() ?? throw new ArgumentNullException(); this.modelValidator = processorLocator.GetProcessor <IValidateModel>() ?? throw new ArgumentNullException(); this.writer = processorLocator.GetProcessor <IWriter>() ?? throw new ArgumentNullException(); }
public SellServiceToClientVehicle(IProcessorLocator processorLocator) { if (processorLocator == null) { throw new ArgumentNullException(); } this.database = processorLocator.GetProcessor <IDatabase>() ?? throw new ArgumentNullException(); this.coreValidator = processorLocator.GetProcessor <IValidateCore>() ?? throw new ArgumentNullException(); this.writer = processorLocator.GetProcessor <IWriter>() ?? throw new ArgumentNullException(); this.autoServiceFactory = processorLocator.GetProcessor <IAutoServiceFactory>() ?? throw new ArgumentNullException(); this.modelValidator = processorLocator.GetProcessor <IValidateModel>() ?? throw new ArgumentNullException(); }
public Employee(string firstName, string lastName, string position, decimal salary, decimal ratePerMinute, DepartmentType department, IValidateModel modelValidator) { this.modelValidator = modelValidator; this.FirstName = firstName; this.LastName = lastName; this.Position = position; this.Salary = salary; this.RatePerMinute = ratePerMinute; this.Department = department; this.isHired = true; this.responsibilities = new List <ResponsibilityType>(); }
//Constructor public OrderStockToWarehouse(IProcessorLocator processorLocator) { if (processorLocator == null) { throw new ArgumentNullException(); } this.database = processorLocator.GetProcessor <IDatabase>() ?? throw new ArgumentNullException(); this.autoServiceFactory = processorLocator.GetProcessor <IAutoServiceFactory>() ?? throw new ArgumentNullException(); this.coreValidator = processorLocator.GetProcessor <IValidateCore>() ?? throw new ArgumentNullException(); this.writer = processorLocator.GetProcessor <IWriter>() ?? throw new ArgumentNullException(); this.stockManager = processorLocator.GetProcessor <IStockManager>() ?? throw new ArgumentNullException(); this.modelValidator = processorLocator.GetProcessor <IValidateModel>() ?? throw new ArgumentNullException(); }
public Vehicle(string make, string model, string registrationNumber, string year, EngineType engine, IValidateModel modelValidator) { this.modelValidator = modelValidator; this.ModelValidator.StringForNullEmpty(make, model, registrationNumber, year); this.ModelValidator.MakeAndModelLength(make, model); this.ModelValidator.RegistrationNumber(registrationNumber); this.ModelValidator.VehicleYear(year); this.model = model; this.make = make; this.registrationNumber = registrationNumber; this.year = year; this.engine = engine; }
public ISell CreateSellService(IEmployee responsibleEmployee, IClient client, IVehicle vehicle, string serviceName, int durationInMinutes, IValidateModel modelValidator) { return(new SellService(responsibleEmployee, client, vehicle, serviceName, durationInMinutes, modelValidator)); }
public SellStock(IEmployee responsibleEmployee, IClient client, IVehicle vehicle, IStock stock, IValidateModel modelValidator) : base(responsibleEmployee, stock.PurchasePrice * 1.2m, client, vehicle, modelValidator) { modelValidator.CheckNullObject(stock); this.stock = stock; }
protected Order(IEmployee responsibleEmployee, ICounterparty supplier, IValidateModel modelValidator) : base(responsibleEmployee, TypeOfWork.Ordering, modelValidator) { modelValidator.CheckNullObject(supplier); this.supplier = supplier; }
//Initialize the singleInstance objects that are used in the methods //properties not needed for now public StockManager(IDatabase database, IValidateModel modelValidator) { this.database = database ?? throw new ArgumentNullException(); this.modelValidator = modelValidator ?? throw new ArgumentNullException(); }
public OrderStock(IEmployee responsibleEmployee, ICounterparty supplier, IStock stock, IValidateModel modelValidator) : base(responsibleEmployee, supplier, modelValidator) { modelValidator.CheckNullObject(stock); this.stock = stock; }
public IVehicle CreateVehicle(string make, string model, string registrationNumber, string year, EngineType engine, int passengerCapacity, IValidateModel modelValidator) { IVehicle newCar = new Car(model, make, registrationNumber, year, engine, passengerCapacity, modelValidator); return(newCar); }
public IInvoice CreateInvoice(string number, DateTime date, IClient client, IValidateModel modelValidator) { return(new Invoice(number, date, client, modelValidator)); }
public Car(string model, string make, string registrationNumber, string year, EngineType engine, int passengerCapacity, IValidateModel modelValidator) : base(model, make, registrationNumber, year, engine, modelValidator) { this.ModelValidator.PassengerCapacity(passengerCapacity); this.passengerCapacity = passengerCapacity; this.VehicleType = VehicleType.Car; }
public SellService(IEmployee responsibleEmployee, IClient client, IVehicle vehicle, string serviceName, int durationInMinutes, IValidateModel modelValidator) : base(responsibleEmployee, durationInMinutes * responsibleEmployee.RatePerMinute * (1 - client.Discount), client, vehicle, modelValidator) { modelValidator.StringForNullEmpty(serviceName); modelValidator.ServiceNameLength(serviceName); modelValidator.ServiceDurationInMinutes(durationInMinutes, minDuration, maxDuration); this.serviceName = serviceName.Trim(); this.durationInMinutes = durationInMinutes; }
public Work(IEmployee responsibleEmployee, TypeOfWork job, IValidateModel modelValidator) { this.responsibleEmployee = responsibleEmployee; this.job = job; this.modelValidator = modelValidator; }
IEmployee IAutoServiceFactory.CreateEmployee(string firstName, string lastName, string position, decimal salary, decimal ratePerMinute, DepartmentType department, IValidateModel modelValidator) { IEmployee newEmployee = new Employee(firstName, lastName, position, salary, ratePerMinute, department, modelValidator); return(newEmployee); }
public ICounterparty CreateClient(string name, string address, string uniqueNumber, IValidateModel modelValidator) { return(new Client(name, address, uniqueNumber, modelValidator)); }
public ISell CreateSellStock(IEmployee responsibleEmployee, IClient client, IVehicle vehicle, IStock stock, IValidateModel modelValidator) { return(new SellStock(responsibleEmployee, client, vehicle, stock, modelValidator)); }
protected Sell(IEmployee responsibleEmployee, decimal sellPrice, IClient client, IVehicle vehicle, IValidateModel modelValidator) : base(responsibleEmployee, TypeOfWork.Selling, modelValidator) { modelValidator.CheckNullObject(new object[] { client, vehicle }); modelValidator.SellPrice(sellPrice); this.client = client; this.sellPrice = sellPrice; this.vehicle = vehicle; }
public IOrderStock CreateOrderStock(IEmployee responsibleEmployee, ICounterparty supplier, IStock stock, IValidateModel modelValidator) { return(new OrderStock(responsibleEmployee, supplier, stock, modelValidator)); }
public Truck(string model, string make, string registrationNumber, string year, EngineType engine, int weightAllowedInKilograms, IValidateModel modelValidator) : base(model, make, registrationNumber, year, engine, modelValidator) { this.WeightAllowedInKilograms = weightAllowedInKilograms; this.VehicleType = VehicleType.Truck; }
public IEmployee CreateEmployee(string firstName, string lastName, string position, decimal salary, decimal ratePerMinute, DepartmentType department, IValidateModel modelValidator) { return(new Employee(firstName, lastName, position, salary, ratePerMinute, department, modelValidator)); }