public Task OnExecute(CommandLineApplication app) { app.ShowVersion(); Console.WriteLine(Environment.NewLine); PrintChoicesMade(); Out.Dump($"Performing DLL discovery..."); DllDiscovery.LoadDllFiles(InputFolder); var eventType = DllDiscovery.FindEventTypeInDlls(); if (!eventType.Found) { Out.Fail("No event types found. Is this a Dolittle project output folder?"); return(Task.CompletedTask); } DllDiscovery.FindAllEvents(); DllDiscovery.MapEventsToEventHandlers(); if (!IgnoreEvents) { DllDiscovery.ReportIssues(); } DllDiscovery.WriteOutputFiles(OutputFolder, PreferJson); Out.Dump("Event mapping completed", overline: true); return(Task.CompletedTask); }
private void PrintChoicesMade() { Out.Dump(PreferJson ? "Output type : JSON" : "Output type : CSV"); if (string.IsNullOrEmpty(InputFolder)) { Out.Dump("Input Folder : Current Directory"); } else { Out.Dump($"Input Folder : {InputFolder}"); } if (string.IsNullOrEmpty(OutputFolder)) { Out.Dump("Output folder: Current Directory"); } else { Out.Dump($"Output folder: {OutputFolder}", underline: true); } }
/// Dump object to the output stream, treating the object as the object of the specified type, preceded by name= public void Dump(object o, Type type, string name) { Out.Dump(o, type, name); }
/// Dump object to the output stream, treating the object as the object of the specified type public void Dump(object o, Type type) { Out.Dump(o, type, string.Empty); }
/// Dump object to the output stream, preceded by name= public void Dump(object o, string name) { Out.Dump(o, name); }
/// Dump object to the output stream public void Dump(object o) { Out.Dump(o); }