public void Place(Order order) { if (order == null) { throw new ArgumentNullException(nameof(order)); } _backpressure.Add(order); OrderOpened?.Invoke(this, new OrderArgs(order)); }
public async Task When_Order_Opened_With_Approval_Message_Should_Be_Sent_To_Confirm_Member_On_Lending_Unit() { var ev = new OrderOpened(orderId, OrderStatusId.Approved); await Run(ev, lending_ConfirmMemberId); }
public async Task When_Order_Opened_Without_Approval_Message_Should_Be_Sent_To_Confirm_Member_On_Requesting_Unit() { var ev = new OrderOpened(orderId, OrderStatusId.New); await Run(ev, requesting_ConfirmMemberId); }
private void RaiseOrderOpened(Order order) { OrderOpened?.Invoke(this, new OrderArgs(order)); }
/// <summary> /// Helper to execute OrderOpened event on a separate thread /// </summary> /// <param name="order">Order that was opened</param> /// <returns>Task being executed on. This allows the caller to await the call</returns> protected Task OnOrderOpened(Order order) { return(Task.Run(() => OrderOpened?.Invoke(this, order))); }