1

我正在尝试使用 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();
}

该代码无法抱怨关闭的流。如果我只放置只读操作,那么一切正常。这里有什么问题?

4

1 回答 1

1

Manatee.Trello.WebApi NuGet 包的 1.0 版似乎存在错误。如果他的库修复了这个错误,Greg Dennis 迅速做出回应并发布了 1.0.1 版。现在上面发布的代码工作正常。

于 2015-09-29T07:49:38.480 回答