/// <summary>
 /// Invoke the async delegates with callback model
 /// </summary>
 /// <param name="filename">Transformation file name</param>
 /// <param name="rawXml">Raw Xml data to be processed</param>
 /// <param name="count">Variable used to keep a track of no of async delegates</param>
 public void CallDelegates(string fileName, string rawXml, int count)
 {
     try
     {
         AdapterTransform adapterTrans = new AdapterTransform();
         delegateApplyTransformation = new DelegateApplyTransformations(adapterTrans.ApplyFullMemoryTransformations);
         result = delegateApplyTransformation.BeginInvoke(fileName, rawXml, count, new AsyncCallback(CallBackMethod), null);
     }
     catch (CustomException ce)
     {
         throw ce;
     }
 }
 /// <summary>
 /// Invoke the async delegates with callback model
 /// </summary>
 /// <param name="filename">Transformation file name</param>
 /// <param name="rawXml">Raw Xml data to be processed</param>
 /// <param name="count">Variable used to keep a track of no of async delegates</param>
 public void CallDelegates(string fileName, string rawXml, int count)
 {
     try
     {
         AdapterTransform adapterTrans = new AdapterTransform();
         // In the below stmt, adapterTrans.ApplyFullMemoryTransformations is the web method being called
         delegateApplyTransformation = new DelegateApplyTransformations(adapterTrans.ApplyFullMemoryTransformations);
         // The below stmt places an async call to the web method
         // Since it is an async operation control flows immediately to the next line eventually coming out of the current method. Hence exceptions in the web service if any will NOT be caught here.
         // CallBackMethod() is the method that will be called automatically after the async operation is done
         // result is an IAsyncResult which will be used in the CallBackMethod to refer to this delegate
         // result gets passed to the CallBackMethod
         result = delegateApplyTransformation.BeginInvoke(fileName, rawXml, count, new AsyncCallback(CallBackMethod), null);
     }
     catch (CustomException ce)
     {
         throw ce;
     }
 }