title: How to wait for the response of event handler in C#?
body: <p>I have an application (A1) which is divided into multiple tiers. Some tiers are used for user interactions, some are used to interact with different databases and some included the business logic. We have another third party application (A2) which sends a request to (A1) and A1 needs to response against the request. Below is the architecture of A1.</p>
  <p>T3 (This tier receives the request from A2 application)</p>
  <p>T2 (Business logic)</p>
  <p>T1 (User Interface)</p>
  <p>T2 contains all the business logic. The problem I am facing is when I receive request from the A2 application. I need to respond against request on the basis of some business logic which presents in T2. I can invoke the event from T3 that is subscribed by T2 but I have to get data from the event handler like below;</p>
  <p>T3:</p>
  <pre><code>public Response CanStore(string materialType){
      //Invoke event and wait to get response from T2
      return response.;
  
  }
  </code></pre>
  <p>T2: Subscribed the event of T3</p>
  <pre><code> public async void canStore(object sender, EventArgs e){
       //Perform some logic and response result to T3
  }
  </code></pre>
  <p>Is it possible?</p>