private Task ProcessMessage(JObject msgJObject) { OccuredEventType eventType = msgJObject.Value <OccuredEventType>("EventType"); JObject eventoObject = msgJObject.Value <JObject>("Data"); var eventId = eventoObject.Value <Guid>("EventId"); switch (eventType) { case OccuredEventType.EventoDeleted: locationManager.ClearEventAndUserLocations(eventId); break; case OccuredEventType.EventoEnded: locationManager.ClearEventAndUserLocations(eventId); break; case OccuredEventType.ParticipantLeft: locationManager.ClearUserLocations(eventoObject.Value <Guid>("UserId"), eventId); break; case OccuredEventType.ParticipantStateUpdated: locationManager.ClearUserLocations(eventoObject.Value <Guid>("UserId"), eventId); break; default: break; } return(Task.CompletedTask); }