public static void Export(this AnalysisViewModel viewModel, ExportFileType type, string path) { switch (type.Title) { case "Analysis": viewModel.ExportSimulation(path, type.Extension); break; case "Graph": viewModel.ExportPlot(path, type.Extension); break; case "Macrocycle": viewModel.ExportCycle(path); break; case "Molecule": viewModel.ExportMolecule(path); break; case "XYData": viewModel.ExportData(path, type.Extension); break; } }