private bool ParseStylesResponse(string resp) { try { using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(resp))) { var ser = new DataContractJsonSerializer(typeof(Responses.Styles.Styles)); Responses.Styles.Styles response = (ser.ReadObject(stream) as Responses.Styles.Styles); Events.OnHandleStylesResponse(response); return(true); } } catch (Exception ex) { Events.OnErrorOccurred(ex.Message); } return(false); }
internal void OnHandleStylesResponse(Responses.Styles.Styles obj) => EventStylesResponse?.Invoke(this, new StylesEventArgs() { StylesResponse = obj });