Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 internal void OnCallback()
 {
     try
     {
         NotifyCallback handler = Callback;
         if (handler != null)
         {
             handler.BeginInvoke(this, EndCallback, null);
         }
     }
     catch (Exception ex)
     {
         TraceLog.WriteError("Notify callback error:{0}", ex);
     }
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            //AsyncWrite();
            AsyncWrite2();

            if (Notify != null)
            {
                IAsyncResult asyncResult = Notify.BeginInvoke(
                    " ", 1, 2, null, Notify);

                // ...

                Notify.EndInvoke(asyncResult);
            }

            Console.ReadLine();
        }