public static string GetConvertedText(TextForConverting convertingText) { var textModel = TextModel.ConvertTextToModel(convertingText.InputText); if (textModel != null) { switch (convertingText.TextFormat) { case TextForConverting.TextFormats.XML: return(TextConverterFactory.GetTextConverter(ConverterTypes.TextToXML).Convert(textModel)); case TextForConverting.TextFormats.CSV: return(TextConverterFactory.GetTextConverter(ConverterTypes.TextToCSV).Convert(textModel)); default: break; } } return(string.Empty); }
public string GetConvertedText(TextForConverting convertingText) { return(Helpers.TextConvertingHelper.GetConvertedText(convertingText)); }
public ViewResult Index(TextForConverting text) { text.ConvertedText = Helpers.TextConvertingHelper.GetConvertedText(text); return(View(text)); }