Action IRunnerRepository.FindRunner(IParseResult inResult, ConsoleLogEventHandler inEvent) { Action<IParseResult, ConsoleLogEventHandler> act; if (mLookups.TryGetValue(inResult.GetType(), out act)) { return () => { act(inResult, inEvent); }; } throw new NotSupportedException(inResult.GetType().ToString()); }