我正在尝试使用 Manatee Trello API 更新 Trello 卡。这是代码:
Run(() =>
{
TrelloProcessor.WaitForPendingRequests = true;
var card = new Card("5609144868309d39826b61f1");
card.Name = "UPDATED: " + card.Name;
TrelloProcessor.Shutdown();
});
private static void Run(Action action)
{
var serializer = new ManateeSerializer();
TrelloConfiguration.Serializer = serializer;
TrelloConfiguration.Deserializer = serializer;
TrelloConfiguration.JsonFactory = new ManateeFactory();
//TrelloConfiguration.RestClientProvider = new RestSharpClientProvider();
TrelloConfiguration.RestClientProvider = new WebApiClientProvider();
TrelloAuthorization.Default.AppKey = authKey;
TrelloAuthorization.Default.UserToken = authToken;
TrelloConfiguration.ThrowOnTrelloError = true;
action();
}
该代码无法抱怨关闭的流。如果我只放置只读操作,那么一切正常。这里有什么问题?