public static void RegisterStdOutput(this CorProcess proc, CorTargetOutputEventHandler handler) { proc.OnProcessExit += delegate { RemoveEventsFor(proc); }; List <CorTargetOutputEventHandler> list; if (!events.TryGetValue(proc, out list)) { list = new List <CorTargetOutputEventHandler> (); } list.Add(handler); events [proc] = list; }
public static void RegisterStdOutput (this CorProcess proc, CorTargetOutputEventHandler handler) { proc.OnProcessExit += delegate { RemoveEventsFor (proc); }; List<CorTargetOutputEventHandler> list; if (!events.TryGetValue (proc, out list)) list = new List<CorTargetOutputEventHandler> (); list.Add (handler); events [proc] = list; }