private ErpService.ShippingInfo ErpProcessOrder(Order order) { ErpService.ShippingInfo info = ErpService.ProcessOrder(order); if (info.Status == ErpService.ShippingStatus.Success) { return(info); } throw new ErpService.ErpException("Info status = " + info.Status); }
private Result <ErpService.ShippingInfo> ErpProcessOrder(Order order) { return(Result <ErpService.ShippingInfo> .ToResult(() => { ErpService.ShippingInfo info = ErpService.ProcessOrder(order); if (info.Status == ErpService.ShippingStatus.Success) { return info; } throw new ErpService.ErpException("Info status = " + info.Status); })); }