HandleServiceResponseObject method
Handles the service response object.
The response.
Implementation
/* private */
Future<void> HandleServiceResponseObject(Object response) async {
GetStreamingEventsResponse gseResponse =
response as GetStreamingEventsResponse;
// if (gseResponse == null)
// {
// throw new ArgumentException("gseResponse == null");
// }
// else
// {
if (gseResponse.Result == ServiceResult.Success ||
gseResponse.Result == ServiceResult.Warning) {
if (gseResponse.Results.Notifications.isNotEmpty) {
// We got notifications; dole them out.
await IssueNotificationEvents(gseResponse);
} else {
//// This was just a heartbeat, nothing to do here.
}
} else if (gseResponse.Result == ServiceResult.Error) {
if (gseResponse.ErrorSubscriptionIds.isEmpty) {
// General error
IssueGeneralFailure(gseResponse);
} else {
// subscription-specific errors
IssueSubscriptionFailures(gseResponse);
}
}
// }
}