How to Wait till the call back function RRS feed

  • Question

  • User-528290895 posted

    Hi ,

    I am currently working on a third party libaray which does the scanning of files which my asp.net MVC project uploads. I want to clarify few things on it.

     Third party library exposes  oncomplete actions such as this,      

    scanner.OnScanComplete += sacnner_OnScanComplete;
    scanner.OnProcess += scanner_OnProcess;

     Scan can be started as 


      if this is the case , how can i wait till the scan to be completed ? 


    Thursday, March 19, 2015 12:38 AM

All replies

  • User753101303 posted


    So this is server side? MVC or WebForms? If I remember the Task Library have something to turn an event into a task so that you can await on it (using an async page or controller). BTW you are sure it doesn't have an async API?

    Edit: This is an antivirus scan? Couldn't saving the file trigger an installed scanner?

    Thursday, March 26, 2015 3:30 PM
  • User-528290895 posted

    Hi  PatriceSc,

    Yeah, this is server side, mvc  and yeah it does not have a async api , what they have is a com+ . yeah it is a antivirus scanner 

    Ill check on that


    Friday, March 27, 2015 2:46 AM