public async Task <IList <OrchestrationState> > GetOrchestrationStateAsync(string instanceId, bool allExecutions) { var request = new GetOrchestrationInstanceStateRequest { InstanceId = instanceId, AllExecutions = allExecutions }; var response = await _client.GetOrchestrationInstanceStateAsync(request); return(response.States .Select(s => _options.DataConverter.Deserialize <OrchestrationState>(s)) .ToArray()); }
public override async Task <GetOrchestrationInstanceStateResponse> GetOrchestrationInstanceState(GetOrchestrationInstanceStateRequest request, ServerCallContext context) { var states = await _orchestrationServiceClient.GetOrchestrationStateAsync( request.InstanceId, request.AllExecutions); var response = new GetOrchestrationInstanceStateResponse { States = { states.Select(s => _options.DataConverter.Serialize(s)) } }; return(response); }