コード例 #1
0
 public static OrderItemState.Result Create(OrderItemId id, OrderId orderId, ProductId productId, decimal unitPrice, decimal discount) =>
    new OrderItemState(id, productId, unitPrice, discount).ApplyEvent(new OrderItemAddedEvent(id, orderId, productId, unitPrice, discount));
コード例 #2
0
 private void EnsureValidState(OrderId id, CustomerId buyerId) =>
 this.ThrowsIf(_ => string.IsNullOrEmpty(id), new ArgumentNullException(id))
 .ThrowsIf(_ => string.IsNullOrEmpty(buyerId), new ArgumentNullException(buyerId));
コード例 #3
0
 public static OrderState.Result Create(OrderId id, CustomerId buyerId, string city, string street) =>
 new OrderState(id, buyerId).ApplyEvent(new OrderStartedEvent(id, buyerId, city, street));
コード例 #4
0
 internal OrderState(OrderId id, CustomerId buyerId) : this() =>