Esempio n. 1
0
        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;
        }
Esempio n. 2
0
		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;
		}