private async Task<GetOperationWorkplaceResult> GetOperationWorkplaceListAsync(long domainKey)
{
GetOperationWorkplaceRequest request = new GetOperationWorkplaceRequest { DomainKey = domainKey };
string requestContents = Newtonsoft.Json.JsonConvert.SerializeObject(request);
HttpResponseMessage responseMessage = await PostHttpRequestAsync(requestContents, new Uri(GetOperationWorkplaceListUri)).ConfigureAwait(false);
if (responseMessage.IsSuccessStatusCode)
{
string stringContents = await responseMessage.Content.ReadAsStringAsync();
return new GetOperationWorkplaceResult
{
OperationWorkplaces = this.CreateResultForOperationWorkplaceListRequest(stringContents)
};
}
{
string errorString = await responseMessage.Content.ReadAsStringAsync();
return new GetOperationWorkplaceResult
{
Error = errorString
};
}
}