private bool ParseHomePageResponse(string resp) { try { using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(resp))) { var ser = new DataContractJsonSerializer(typeof(Responses.Home.HomeResponse)); Responses.Home.HomeResponse response = (ser.ReadObject(stream) as Responses.Home.HomeResponse); Events.OnHandleHomePageResponse(response); return(true); } } catch (Exception ex) { Events.OnErrorOccurred(ex.Message); } return(false); }
internal void OnHandleHomePageResponse(Responses.Home.HomeResponse obj) => EventHomePageResponse?.Invoke(this, new HomePageEventArgs() { HomeResponse = obj });