예제 #1
0
 /// <summary>
 /// This procedure is invoked on a threadpool thread.
 /// </summary>
 /// <param name="args"></param>
 private void Invoke(RemoteEventArgs args)
 {
     try
     {
         // now really send this event
         _mi.Invoke(this._proxy, new object[] { args });
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
 }
예제 #2
0
 /// <summary>
 /// the dispatch method that is responsible for the actual events dispatch
 /// </summary>
 /// <param name="args">an event argument that is a 'RemoteEventArgs' derived object</param>
 public void DispatchEvent(RemoteEventArgs args)
 {
     // a delegate is used here to dispatch the event on a thread pool thread
     _eventDelegate.BeginInvoke(args, null, null);
 }