我不清楚为什么在操作实际上被标记为异步时收到此消息。
这是我的测试
public void TestMethod1()
{
SvcRestClient client =
new SvcRestClient(new Uri("http://localhost:44395"),
new AnonymousCredential());
var tokenRequest = new TokenRequest
{
Username = "myusername",
Password = "p@ssword1"
};
tokenRequest.Validate(); // passes
var tokenResponse = await client.ApiRequestTokenPostWithHttpMessagesAsync(tokenRequest);
}
如果我尝试添加 await 我会收到警告