public static async Task <GrpcShipmentList> SearchShipments(GrpcShipmentSearchRequest req) { try { return(await Client.SearchShipmentsAsync(req)); } catch (Exception) { throw; } }
public override async Task <GrpcShipmentList> SearchShipments(GrpcShipmentSearchRequest request, ServerCallContext context) { try { return(await Controller.SearchShipments(request)); } catch (Exception e) { throw HandleException(e); } }
public static async Task <GrpcShipmentList> SearchShipments(GrpcShipmentSearchRequest grpcRequest) { try { var req = GrpcShipmentSearchRequestAdapter.Adapt(grpcRequest); var resp = await ShipmentUseCases.Search.Execute(req); return(ShipmentListPresenter.Present(resp)); } catch (Exception e) { throw; } }
public static ShipmentSearch Adapt(GrpcShipmentSearchRequest req) { return(new ShipmentSearch() { AutoUpdate = GrpcBooleanFilterAdapter.AdaptFrom(req.AutoUpdate), IsAwaitingForPickUp = GrpcBooleanFilterAdapter.AdaptFrom(req.IsAwaitingForPickUp), IsBeingTransported = GrpcBooleanFilterAdapter.AdaptFrom(req.IsBeingTransported), IsDelivered = GrpcBooleanFilterAdapter.AdaptFrom(req.IsDelivered), IsDeliveredToDestination = GrpcBooleanFilterAdapter.AdaptFrom(req.IsDeliveredToDestination), IsPosted = GrpcBooleanFilterAdapter.AdaptFrom(req.IsPosted), IsRejected = GrpcBooleanFilterAdapter.AdaptFrom(req.IsRejected), BoundMarketplace = GrpcStringFilterAdapter.AdaptFrom(req.BoundMarketplace), ShippingImplementation = GetShippingImplementation(req.ShippingImplementation), DynamicString = GrpcStringFilterAdapter.AdaptFrom(req.DynamicString), Pagination = GrpcPaginationAdapter.Adapt(req.Pagination) }); }