public override void OnUpdate() { if (_task.IsFaulted || _task.IsCanceled) { ParseException _e = PlayMakerParseProxy.GetParseException(_task.Exception); if (_e != null) { if (_e.Code == ParseException.ErrorCode.ObjectNotFound) { Fsm.Event(noResultEvent); } else { LogWarning(_e.Code + " " + _e.Message); Fsm.EventData.IntData = (int)_e.Code; Fsm.EventData.StringData = _e.Message; Fsm.Event(errorEvent); } } else { Fsm.Event(errorEvent); } Finish(); } else if (_task.IsCompleted) { resultObjectId.Value = PlayMakerParseProxy.CacheParseObject(_task.Result); Fsm.Event(successEvent); Finish(); } }
public override void OnUpdate() { if (_task.IsFaulted || _task.IsCanceled) { ParseException _e = PlayMakerParseProxy.GetParseException(_task.Exception); string _eMessage = ""; if (_e != null) { _eMessage = "ErrorCode:" + _e.Code + " ErrorMessage:" + _e.Message; Fsm.EventData.IntData = (int)_e.Code; Fsm.EventData.StringData = _e.Message; Fsm.Event(errorEvent); } else { Fsm.Event(errorEvent); } LogError("Parse SaveAsync failed :" + _eMessage); Finish(); } if (_task.IsCompleted) { objectId.Value = _object.ObjectId; PlayMakerParseProxy.CacheParseObject(_object); Fsm.Event(successEvent); Finish(); } }
public override void OnUpdate() { if (_task.IsFaulted || _task.IsCanceled) { isLoggedIn.Value = false; ParseException _e = PlayMakerParseProxy.GetParseException(_task.Exception); if (_e != null) { Fsm.EventData.IntData = (int)_e.Code; Fsm.EventData.StringData = _e.Message; Fsm.Event(errorEvent); } else { Fsm.Event(errorEvent); } Finish(); } else if (_task.IsCompleted) { isLoggedIn.Value = true; Fsm.Event(successEvent); Finish(); } }
public override void OnUpdate() { if (_task.IsFaulted || _task.IsCanceled) { ParseException _e = PlayMakerParseProxy.GetParseException(_task.Exception); if (_e != null) { Fsm.EventData.IntData = (int)_e.Code; Fsm.EventData.StringData = _e.Message; } Fsm.Event(errorEvent); Finish(); } else if (_task.IsCompleted) { PlayMakerParseProxy.CacheParseObject(_task.Result); Fsm.Event(successEvent); Finish(); } }