public static AcquireData GetAcquireData(this IAnalyzeService service, int projectId) { var operation = new AsyncServiceOperation <AcquireData>(); service.GetAcquireData(projectId, operation.OnDone, operation.OnError); return(operation.WaitCompletion()); }
public async Task <IHttpActionResult> GetAcquireData([DynamicBody] dynamic param) { try { int projectId = (int)param.projectId; return(Ok(await _analyzeService.GetAcquireData(projectId))); } catch (Exception ex) { _traceManager.TraceError(ex, ex.Message); return(InternalServerError(ex)); } }