/// <summary> /// Performs the receive processing for an <see cref="EventHubs.EventData"/> instance. /// </summary> /// <param name="event">The <see cref="EventHubs.EventData"/> instance to receive/process.</param> public async Task ReceiveAsync(EventHubs.EventData @event) { if (@event == null) { return; } // Convert EventHubs.EventData to Beef.EventData.. var(subject, action, _) = @event.GetBeefMetadata(); await ReceiveAsync(subject, action, (subscriber) => { try { return(subscriber.ValueType == null ? @event.ToBeefEventData() : @event.ToBeefEventData(subscriber.ValueType)); } #pragma warning disable CA1031 // Do not catch general exception types; by design, need this to be a catch-all. catch (Exception ex) { throw new InvalidEventDataException(ex); } #pragma warning restore CA1031 }).ConfigureAwait(false); }
/// <summary> /// Performs the receive processing for an <see cref="EventHubs.EventData"/> instance. /// </summary> /// <param name="event">The <see cref="EventHubs.EventData"/> instance to receive/process.</param> public async Task ReceiveAsync(EventHubs.EventData @event) { if (@event == null) { return; } var(subject, action, _) = @event.GetBeefMetadata(); await ReceiveAsync(subject, action, (subscriber) => subscriber.ValueType == null? @event.ToBeefEventData() : @event.ToBeefEventData(subscriber.ValueType)).ConfigureAwait(false); }