forked from loafle/openapi-generator-original
fix sync call for uwp
This commit is contained in:
parent
f5dd7ae031
commit
a8bbb37866
@ -163,11 +163,9 @@ namespace {{packageName}}.Client
|
||||
var response = RestClient.Execute(request);
|
||||
{{/supportsUWP}}
|
||||
{{#supportsUWP}}
|
||||
// TODO: This is obviously not a valid response, but it prevents compiling-errors
|
||||
// 'RestClient.CallApiAsync(..)' is used instead, because 'RestClient.ExecuteAsync(...)'
|
||||
// is available for Windows UWP, while 'RestClient.CallApi(...)' is not
|
||||
var response = new object();
|
||||
{{/supportsUWP}}
|
||||
// Using async method to perform sync call (uwp-only)
|
||||
var response = RestClient.ExecuteTaskAsync(request).Result;
|
||||
{{/supportsUWP}}
|
||||
return (Object) response;
|
||||
}
|
||||
{{#supportsAsync}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user