Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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
     });
 }
Exemplo n.º 3
0
      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);
      }
Exemplo n.º 4
0
 public void SetTrailer(Trailer trailer)
 {
     Trailer = trailer;
 }
Exemplo n.º 5
0
 public Trailer SetTrailer(Trailer trailer)
 {
     this.CurrentTrailer = trailer;
     return(this.CurrentTrailer);
 }