public Spawnable(string path, SpawnOptions options, ISpawner spawner, Func <ISpawnable <T>, IObserver <T>, IDisposable> subscriber) { ProgramPath = path ?? throw new ArgumentNullException(nameof(path)); Options = options ?? throw new ArgumentNullException(nameof(options)); Spawner = spawner ?? throw new ArgumentNullException(nameof(spawner)); _subscriber = subscriber ?? throw new ArgumentNullException(nameof(subscriber)); }
Spawn <T>(string path, SpawnOptions options, Func <string, T>?stdout, Func <string, T>?stderr) => Observable.Create <T>(observer => Spawner.Spawn(path, options, stdout, stderr, observer));