public IAsyncResult Register(AsyncCallback callback, object state) { var result = new BusAsyncResult(callback, state); if (Registered != null) { Registered(this, new BusAsyncResultEventArgs { Result = result, MessageId = messageId }); } return(result); }
public IAsyncResult Register(AsyncCallback callback, object state) { if (isSendOnly) { throw new Exception("Callbacks are invalid in a sendonly endpoint."); } var result = new BusAsyncResult(callback, state); if (Registered != null) { Registered(this, new BusAsyncResultEventArgs { Result = result, MessageId = messageId }); } return(result); }