private OrchestrationStatusQueryResult ConvertFrom(DurableStatusQueryResult statusContext)
        {
            var results = new List <DurableOrchestrationStatus>();

            foreach (var state in statusContext.OrchestrationState)
            {
                results.Add(DurableClient.ConvertOrchestrationStateToStatus(state));
            }

            var result = new OrchestrationStatusQueryResult
            {
                DurableOrchestrationState = results,
                ContinuationToken         = statusContext.ContinuationToken,
            };

            return(result);
        }
 /// <summary>
 /// Converts the DTFx representation of the orchestration state into the DF representation.
 /// </summary>
 /// <param name="orchestrationState">The orchestration state.</param>
 /// <returns>The orchestration status.</returns>
 public static DurableOrchestrationStatus ConvertOrchestrationStateToStatus(OrchestrationState orchestrationState)
 {
     return(DurableClient.ConvertOrchestrationStateToStatus(orchestrationState));
 }