- 修复 3.2.665-3.2.680 子查询的特殊 bug;

This commit is contained in:
2881099
2022-10-12 15:31:22 +08:00
parent 3e5e84f83c
commit 588320dbfb
4 changed files with 64 additions and 4 deletions

View File

@ -22,8 +22,12 @@ public static partial class FreeSqlGlobalExtensions
{
#if net40
#else
static readonly Lazy<PropertyInfo> _TaskReflectionResultPropertyLazy = new Lazy<PropertyInfo>(() => typeof(Task).GetProperty("Result"));
internal static object GetTaskReflectionResult(this Task task) => _TaskReflectionResultPropertyLazy.Value.GetValue(task, new object[0]);
internal static object GetTaskReflectionResult(this Task task)
{
var propResult = task?.GetType().GetProperty("Result");
if (propResult != null) return propResult.GetValue(task, new object[0]);
return null;
}
#endif
#region Type