예제 #1
0
 private void OnMessageReceived(MessageReceivedEventArgs eventArgs)
 {
     m_synchronizationContext.Post(e => MessageReceivedEvent.SafeInvoke(this, (MessageReceivedEventArgs)e), eventArgs);
 }
예제 #2
0
 private void OnMessageReceived(MessageReceivedEventArgs eventArgs)
 {
     Console.WriteLine($"server: message received=[{eventArgs.Message}]");
     _synchronizationContext.Post(e => MessageReceivedEvent.SafeInvoke(this, (MessageReceivedEventArgs)e), eventArgs);
 }