void InitActionMapping() { _actionMapping = PresenterUtil.GetAllPresenterAction(); var eventsInfo = PresenterUtil.GetAllPresetnerEvents(); foreach (var info in eventsInfo) { var v = info.Value.Field.GetValue(null); if (v == null) { v = Activator.CreateInstance(info.Value.Field.FieldType); info.Value.Field.SetValue(null, v); } ((PresenterEvent)v).Url = info.Value.Url; } }
public bool HasEditorError() { var eventsMapping = PresenterUtil.GetAllPresetnerEvents(); if (!eventsMapping.ContainsKey(_url)) { return(true); } if (_eventParameterBinders.Any(b => b == null)) { return(true); } return(BinderUtil.IsUnityEventHasError(_beforeReceiveData) || BinderUtil.IsUnityEventHasError(_afterReceiveData)); }
public bool HasEditorError() { var actionMapping = PresenterUtil.GetAllPresenterAction(); if (!actionMapping.ContainsKey(_url)) { return(true); } if (_toSendDataBinders.Any(b => b == null) || _responseDataBinder.Any(b => b == null)) { return(true); } return(BinderUtil.IsUnityEventHasError(_beforeReceiveData) || BinderUtil.IsUnityEventHasError(_afterReceiveData)); }
void OnEnable() { _allActions = PresenterUtil.GetAllPresenterAction().Values.ToList(); _urls = _allActions.Select(a => a.Url).ToList(); _displayUrls = _allActions.Select(a => string.IsNullOrEmpty(a.DisplayUrl) ? a.Url : a.DisplayUrl).ToArray(); }