我一直在尝试以下方法来检索数据:
void InitializeTrello()
{
TrelloConfiguration.Serializer = new ManateeSerializer();
TrelloConfiguration.Deserializer = new ManateeSerializer();
TrelloConfiguration.JsonFactory = new ManateeFactory();
TrelloConfiguration.RestClientProvider = new Manatee.Trello.WebApi.WebApiClientProvider();
TrelloConfiguration.ThrowOnTrelloError = true;
}
T DownloadDataFromTrello<T>(TrelloAccount account, Func<T> func)
{
TrelloConfiguration.Cache.Clear();
TrelloAuthorization.Default.AppKey = account.AppKey;
TrelloAuthorization.Default.UserToken = account.UserToken;
T result = func();
TrelloProcessor.Flush();
return result;
}
使用不同的和参数DownloadDataFromTrello
多次调用方法。尽管在函数内部调用,但每次调用我都会收到相同的数据。AppKey
UserToken
TrelloConfiguration.Cache.Clear()
我想使用库而不使用卸载静态类的肮脏技巧并保留延迟加载功能。有谁知道如何正确使用这个库和多个用户帐户?