CustomerOrder.Actor.CustomerOrderActor.SubmitOrderAsync C# (CSharp) Method

SubmitOrderAsync() public method

This method accepts a list of CustomerOrderItems, representing a customer order, and sets the actor's state to reflect the status and contents of the order. Then, the order is fulfilled with a private FulfillOrder call that abstracts away the entire backorder process from the user.
public SubmitOrderAsync ( IEnumerable orderList ) : Task
orderList IEnumerable
return Task
        public async Task SubmitOrderAsync(IEnumerable<CustomerOrderItem> orderList)
        {
            try
            {
                await this.StateManager.SetStateAsync<List<CustomerOrderItem>>(OrderItemListPropertyName, new List<CustomerOrderItem>(orderList));
                await this.StateManager.SetStateAsync<CustomerOrderStatus>(OrderStatusPropertyName, CustomerOrderStatus.Submitted);

                await this.RegisterReminderAsync(
                    CustomerOrderReminderNames.FulfillOrderReminder,
                    null,
                    TimeSpan.FromSeconds(10),
                    TimeSpan.FromSeconds(10));
            }
            catch (Exception e)
            {
                ActorEventSource.Current.Message(e.ToString());
            }

            ActorEventSource.Current.Message("Order submitted with {0} items", orderList.Count());

            return;
        }