void IQueueClient.Initialize(QueueClient queueClient) { client = queueClient; client.OnMessage(m => { if (!MessageReceived.IsInstance()) { m.Abandon(); return; } try { MessageReceived(this, m.GetBody <T>()); m.Complete(); } catch (Exception ex) { Logging.Exception(ex, "Message handling failed"); m.Abandon(); } }); }