jjzjj

asyncState

全部标签

c# - 在 C# 的 StackExchange.Redis 中将什么用作 asyncState 对象(或从哪里获取它)

我尝试使用StackExchange.Redisnuget将同步Redis存储转换为.NETCore2.2WebAPI的异步实现。同步版本有效。BasicUsageGuide状态:Additionally,ifyouplantomakeuseoftheasynchronousAPIandyourequiretheTask.AsyncStatetohaveavalue,thiscanalsobespecified:intdatabaseNumber=...objectasyncState=...IDatabasedb=redis.GetDatabase(databaseNumber,as

c# - 在 C# 的 StackExchange.Redis 中将什么用作 asyncState 对象(或从哪里获取它)

我尝试使用StackExchange.Redisnuget将同步Redis存储转换为.NETCore2.2WebAPI的异步实现。同步版本有效。BasicUsageGuide状态:Additionally,ifyouplantomakeuseoftheasynchronousAPIandyourequiretheTask.AsyncStatetohaveavalue,thiscanalsobespecified:intdatabaseNumber=...objectasyncState=...IDatabasedb=redis.GetDatabase(databaseNumber,as