public void Modify(Trailer trailer, string model, int maximumWeightKg, int capacity, int numberAxles, decimal height, decimal width, decimal length) { trailer.Model = model; trailer.MaximWeightKg = maximumWeightKg; trailer.Capacity = capacity; trailer.NumberAxles = numberAxles; trailer.Height = height; trailer.Width = width; trailer.Length = length; }
public static Request Create(Guid senderId, Vehicle vehicle, Trailer trailer) { return(new Request { Id = Guid.NewGuid(), SenderId = senderId, Vehicle = vehicle, Trailer = trailer, Status = RequestStatus.Active, Date = DateTime.UtcNow }); }
public static Trailer Create(string model, int maximumWeightKg, int capacity, int numberAxles, decimal height, decimal width, decimal length) { if (string.IsNullOrEmpty(model)) { throw new ArgumentException(""); } if (maximumWeightKg <= 0) { throw new ArgumentException(""); } if (capacity <= 0) { throw new ArgumentException(""); } if (numberAxles <= 0) { throw new ArgumentException(""); } if (height <= 0) { throw new ArgumentException(""); } if (width <= 0) { throw new ArgumentException(""); } if (length <= 0) { throw new ArgumentException(""); } var trailer = new Trailer { Id = Guid.NewGuid(), Model = model, MaximWeightKg = maximumWeightKg, Capacity = capacity, NumberAxles = numberAxles, Height = height, Width = width, Length = length/*, * Status = Status.Free*/ }; return(trailer); }
public void SetTrailer(Trailer trailer) { Trailer = trailer; }
public Trailer SetTrailer(Trailer trailer) { this.CurrentTrailer = trailer; return(this.CurrentTrailer); }