private async UniTask LaunchGraph(UniGraph graph, IDisposableContext context) { if (awaitGraph) { await graph.ExecuteAsync(context); } else { graph.ExecuteAsync(context) .AttachExternalCancellation(LifeTime.TokenSource) .Forget(); } }
protected sealed override UniTask OnExecute() { LifeTime.AddDispose(_graphContext); LifeTime.AddCleanUpAction(() => _graphContext = new EntityContext()); graphProcessor?.ExecuteAsync(this) .AttachExternalCancellation(LifeTime.TokenSource) .Forget(); LoadDataSources() .AttachExternalCancellation(LifeTime.TokenSource) .Forget(); return(UniTask.CompletedTask); }
public async UniTask ExecuteAsync(IDisposableContext context) { _graphContext = context; await ExecuteAsync(); }
private void Awake() => _graphContext = new EntityContext();