Is there any documentation on what the NotificationOutcome class state looks like on a failure?
NotificationOutcome result = await _hub.SendNotificationAsync(azureNotification, tags);
The MSDN documentation is pretty (completely) useless.
I'm guessing non-zero for result.Failure
and result.Success
means something went wrong (both seem to be 0 on a success) result.State
is maybe more useful but there doesn't seem to be much documentation on this either
I've found the answer on this page
If the EnableTestSend property is set to false for a NotificationHubClient object, all Send* methods return a NotificationOutcome instance with State set to Enqueued, and no additional information. If EnableTestSend is true, State will be set to DetailedStateAvailable, and this class contains information about how many notifications were successfully delivered. In case of failures, it provides the specific outcome, in the same manner as the notification hub telemetry.
That means that Success and Failure mean the number of succeeded and failed notifications and will exist only if EnableTestSend parameter was set to true on client creation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With