【发布时间】:2017-11-16 02:03:40
【问题描述】:
我正在使用 hellosign c# api,当我使用以下代码调用帐户信息函数时
var helloSign = new HelloSignClient("username", "password");
Account account = await helloSign.Account.GetAsync();
Console.WriteLine("Your current callback: " + account.CallbackUrl);
我遇到了错误。
Error 2 The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.
下面是GetAsync方法
public async Task<Account> GetAsync()
{
AccountWrapper accountWrapper = await helloSignService.MakeRequestAsync<AccountWrapper>(settings.HelloSignSettings.Endpoints.Account.Get);
return accountWrapper.Account;
}
这是帐户类的类型
public class Account : AccountCondensedWithRole
{
[JsonProperty("callback_url")]
public string CallbackUrl { get; internal set; }
}
谁能告诉我如何调用它或如何调试它???
【问题讨论】:
-
该签名最近是否发生了变化 - 你能尝试一个干净的构建吗?
-
@DanielA.White 我已经重建了..但没有工作......所以我想发布它..
-
@DanielA.White 最近签名更改是什么意思...???