Exemplo n.º 1
0
        protected virtual void OnSiusDataReceived(SiusDataReceivedEventArgs e)
        {
            EventHandler <SiusDataReceivedEventArgs> handler = SiusDataReceived;

            if (handler != null)
            {
                _asyncOperation.Post(delegate { handler(this, e); }, null);
            }
        }
 private void DataReaderOnSiusDataReceived(object sender, SiusDataReceivedEventArgs siusDataReceivedEventArgs)
 {
   string[] split = siusDataReceivedEventArgs.Message.Split(new string[] {"\r\n"}, StringSplitOptions.RemoveEmptyEntries);
   foreach (string s in split)
   {
     try
     {
       ProcessSiusDataMessage(s);        
     }
     catch (Exception e)
     {
       LogMessage(string.Format("Error processing message: {0}. Error: {1}", s, e.Message));
     }
   }
 }
 protected virtual void OnSiusDataReceived(SiusDataReceivedEventArgs e)
 {
   EventHandler<SiusDataReceivedEventArgs> handler = SiusDataReceived;
   if (handler != null) _asyncOperation.Post(delegate { handler(this, e); }, null);
 }