コード例 #1
0
        public static async Task GetOrderStatus(Guid customerOrderId)
        {
            ICustomerOrderActor customerOrder = ActorProxy.Create <ICustomerOrderActor>(new ActorId(customerOrderId), applicationName);
            string status = await customerOrder.GetStatusAsync();

            Console.WriteLine("Order status is: " + status);
            return;
        }
        public Task <string> GetOrderStatus(Guid customerOrderId)
        {
            ServiceUriBuilder   builder       = new ServiceUriBuilder(CustomerOrderServiceName);
            ICustomerOrderActor customerOrder = ActorProxy.Create <ICustomerOrderActor>(new ActorId(customerOrderId), builder.ToUri());

            try
            {
                return(customerOrder.GetStatusAsync());
            }
            catch (Exception ex)
            {
                ServiceEventSource.Current.Message("Web Service: Exception {0}: {1}", customerOrder, ex);

                throw;
            }
        }