public static ActivityResult Run([ActivityTrigger] IDurableActivityContext context) { return(ActivityResult.Fulfilled(nameof(BookHotelActivity), new Hotel { BookingId = Guid.NewGuid() })); }
public static ActivityResult Run([ActivityTrigger] IDurableActivityContext context) { var input = context.GetInput <Dictionary <string, object> >(); var booking = JsonConvert.DeserializeObject <Booking>(input["Booking"].ToString()); return(ActivityResult.Fulfilled(nameof(BookFlightActivity), new Flight { FlightId = Guid.NewGuid() })); }
public static ActivityResult Run([ActivityTrigger] IDurableActivityContext context) { var input = context.GetInput <Dictionary <string, object> >(); if (Guid.Parse(input["ClientId"].ToString()) == Guid.Parse("5a308090-1ea9-4f3f-bfb6-892adfe51c02")) { throw new Exception("Test exception"); } return(ActivityResult.Fulfilled(nameof(PaymentActivity), new Payment { PaymentId = Guid.NewGuid() })); }