public Task <string> GetAll() { TaskCompletionSource <string> _taskComplete = new TaskCompletionSource <string>(); Task.Run(() => { string result = HttpClientHelpers.Instance().GET(URLConstants.PROJECT_GET_ALL); _taskComplete.SetResult(result); }); return(_taskComplete.Task); }
public Task <string> GetByServerIP(string serverip) { TaskCompletionSource <string> _taskComplete = new TaskCompletionSource <string>(); Task.Run(() => { string url = string.Format(URLConstants.PROJECT_GETBY_SERVERIP, serverip); string result = HttpClientHelpers.Instance().GET(url); _taskComplete.SetResult(result); }); return(_taskComplete.Task); }
public Task <string> GetConfigVideo(string id) { TaskCompletionSource <string> _taskComplete = new TaskCompletionSource <string>(); Task.Run(() => { string url = string.Format(URLConstants.SOURCE_GET_CONFIG_VIDEOS, id); string result = HttpClientHelpers.Instance().GET(url); _taskComplete.SetResult(result); }); return(_taskComplete.Task); }