Reactive Extensions for Processes

The .NET System.Diagnostics.Process API is a bit of a low-level API with some inconvenience. In some cases the control may be useful, in many other cases, it is tedious and unproductive to use. As a thought experiment, I decided to try to model the process API from the point of view of a stream of events (of different kinds), in particular as an observable stream of events (i.e. System.IObservable).

The new API can be called like this (in this case using LINQPad’s Dump extension method for demonstration purposes):

ProcessObservable.CreateFromExecutableFile(@"C:\Temp\Output.exe").Dump();

It also supports running script files now.

The full source code is located at this Github repository:

https://github.com/exoteric/ObservableProcess

example

Advertisements

About xosfaere

Software Developer
This entry was posted in Computer Science, Declarative, Imperative, Paradigm, Program, Technical, Uncategorized and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s