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