Ejemplo n.º 1
0
            private async Task UploadActionLogModel(ActionLogModel model)
            {
                if (!_backendFacade.IsConnected)
                {
                    return;
                }

                await _backendFacade.UploadActionLog(_backendDataControlMediator.UserDataModel.UserId, model);
            }
Ejemplo n.º 2
0
        private const string UploadActionLogMethod = "UploadHistory"; // just a random method for now

        public async Task UploadActionLog(string userId, ActionLogModel actionLogModel)
        {
            string actionLogModelJson = JsonConvert.SerializeObject(actionLogModel, Formatting.Indented);
            Dictionary <string, object> actionLogModelJsonDictionary =
                JsonConvert.DeserializeObject <Dictionary <string, object> >(actionLogModelJson);

            actionLogModelJson =
                JsonConvert.SerializeObject(actionLogModelJsonDictionary[nameof(ActionLogModel.LogData)],
                                            Formatting.Indented);
            Debug.Log("Logging action: \n" + actionLogModelJson);
            await Task.Delay(1000);
        }