You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The UniversalWrapper.cs, if used for a sync method and return Task:
publicTaskATask(){returnTask;}
Will thorw a convert exception in (Task<T>)target(args). _asyncHandler need to add a check conditions methodInfo.GetCustomAttributes<AsyncStateMachineAttribute>().Any() conditions.
And UniversalWrapper use MethodBase.Invoke() method, I think Invoke() function doesn't have good performance.
How about add a async Around method for async method?
Hi @jerviscui , we're currently working on more sophisticated version of Universal Wrapper here #148.
Apart of that I was long thinking about what you're suggesting - to make aspect compiler recognize and process async methods in different way. It would require some significant changes, so until then I guess upcoming version of #148 will do the trick
The UniversalWrapper.cs, if used for a sync method and return Task:
Will thorw a convert exception in
(Task<T>)target(args)
._asyncHandler
need to add a check conditionsmethodInfo.GetCustomAttributes<AsyncStateMachineAttribute>().Any()
conditions.And UniversalWrapper use
MethodBase.Invoke()
method, I thinkInvoke()
function doesn't have good performance.How about add a async Around method for async method?
I don't know if I am right. Just a thought.
The text was updated successfully, but these errors were encountered: