// Refresh traits data private static void RefreshTraitsData(WitConfiguration configuration, Action <string> onRefreshComplete) { PerformConfigRequest(configuration, configuration.ListTraitsRequest(), ApplyTraitList, (error) => { RefreshDataComplete(configuration, error, onRefreshComplete); }); }
private static void ListTraits(WitRequest er, WitConfiguration configuration, Action onUpdateComplete) { EditorForegroundRunner.Run(() => { var traitsRequest = configuration.ListTraitsRequest(); traitsRequest.onResponse = (tr) => { EditorForegroundRunner.Run(() => { OnUpdateData(tr, (dataResponse) => UpdateTraitList(configuration, dataResponse), onUpdateComplete); }); }; OnUpdateData(er, (entityResponse) => UpdateEntityList(configuration, entityResponse), traitsRequest.Request); }); }