fix sync call for uwp

This commit is contained in:
Jerome Dreyer 2016-04-11 08:24:18 +02:00
parent f5dd7ae031
commit a8bbb37866

View File

@ -163,11 +163,9 @@ namespace {{packageName}}.Client
var response = RestClient.Execute(request); var response = RestClient.Execute(request);
{{/supportsUWP}} {{/supportsUWP}}
{{#supportsUWP}} {{#supportsUWP}}
// TODO: This is obviously not a valid response, but it prevents compiling-errors // Using async method to perform sync call (uwp-only)
// 'RestClient.CallApiAsync(..)' is used instead, because 'RestClient.ExecuteAsync(...)' var response = RestClient.ExecuteTaskAsync(request).Result;
// is available for Windows UWP, while 'RestClient.CallApi(...)' is not {{/supportsUWP}}
var response = new object();
{{/supportsUWP}}
return (Object) response; return (Object) response;
} }
{{#supportsAsync}} {{#supportsAsync}}