示例#1
0
 /// <summary>
 /// Initializes new instance of <see cref="Consignment"/>.
 /// </summary>
 /// <param name="correlationId">Correlation ID.</param>
 /// <param name="shippingDateTime">Shipping date and time to Bring.</param>
 /// <param name="parties">Parties information. For more see: <see cref="Parties"/>.</param>
 /// <param name="product">Product information. For more see: <see cref="Product"/>.</param>
 /// <param name="packages">List of package information included in consignment. For more see <see cref="Package"/>.</param>
 public Consignment(
     string correlationId,
     DateTime shippingDateTime,
     Parties parties,
     Product product,
     IEnumerable <Package> packages)
 {
     if (correlationId == null)
     {
         throw new ArgumentNullException("correlationId");
     }
     if (parties == null)
     {
         throw new ArgumentNullException("parties");
     }
     if (product == null)
     {
         throw new ArgumentNullException("product");
     }
     if (packages == null)
     {
         throw new ArgumentNullException("packages");
     }
     Packages         = packages;
     Product          = product;
     ShippingDateTime = shippingDateTime;
     Parties          = parties;
     CorrelationId    = correlationId;
 }
示例#2
0
 /// <summary>
 /// Initializes new instance of <see cref="Consignment"/>.
 /// </summary>
 /// <param name="correlationId">Correlation ID.</param>
 /// <param name="shippingDateTime">Shipping date and time to Bring.</param>
 /// <param name="parties">Parties information. For more see: <see cref="Parties"/>.</param>
 /// <param name="product">Product information. For more see: <see cref="Product"/>.</param>
 /// <param name="packages">List of package information included in consignment. For more see <see cref="Package"/>.</param>
 public Consignment(
     string correlationId,
     DateTime shippingDateTime,
     Parties parties,
     Product product,
     IEnumerable <Package> packages)
 {
     Packages         = packages ?? throw new ArgumentNullException(nameof(packages));
     Product          = product ?? throw new ArgumentNullException(nameof(product));
     ShippingDateTime = shippingDateTime;
     Parties          = parties ?? throw new ArgumentNullException(nameof(parties));
     CorrelationId    = correlationId ?? throw new ArgumentNullException(nameof(correlationId));
 }