AsyncResult not supporting in .Net Core

I'm migrating MVC application into .NET Core that I had to make code changes to workaround AsyncResult class

ERROR: The type or namespace name 'AsyncResult' couldn't not be found (are you missing a using directive or an assembly reference?)

private static void CopyCallback(IAsyncResult ar)
{
CopyMemoryStreamToFileDelegate copydelegate;
try
{
//Get the asyncresult
AsyncResult aResult=(AsyncReault)ar;// here I'm getting error Asyncresult 
//Get the delegate that has fired the beginInvoke
copyDelegate=aResult.AsyncDelegate as   
CopyMemoryStreamToFileDelegate;
if(copyDelegate == null) return;

//End Envoke

copyDelegat.EndInvoke(ar);
}
Catch(Exception ex)
{
Log.error(null,"copycallback: CopyMemoryStreamToFile throw ana exception",ex);
}


Read more here: https://stackoverflow.com/questions/67381029/asyncresult-not-supporting-in-net-core

Content Attribution

This content was originally published by Anil Kumar at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: