public IEnumerator Run( Client client, GameSession session, string jobQueueNamespaceName, RunJobEvent onRunJob, ErrorEvent onError ) { if (_watching) { throw new InvalidOperationException("already started"); } _watching = true; _client = client; _session = session; _jobQueueNamespaceName = jobQueueNamespaceName; _onRunJob = onRunJob; _onError = onError; _onRunJob.AddListener(OnRunJob); _onError.AddListener(OnError); yield return(Execute()); }