private string?Parse(IDataObject data, Mode mode) { if (mode == Mode.Asm) { if (data.GetData(DataFormats.Text) is string text) { return(AsmFormatter.MakeHtml(text)); } return(null); } if (data.GetData(DataFormats.Html) is string html) { var p = new HtmlParser(mode); return(p.Parse(html)); } if (data.GetData(DataFormats.Rtf) is string rtf) { var p = new RtfParser(mode); return(p.Parse(rtf)); } return(null); }
private string Parse(IDataObject data, Mode mode) { var html = data.GetData(DataFormats.Html) as string; if (html != null) { var p = new HtmlParser(mode); return p.Parse(html); } var rtf = data.GetData(DataFormats.Rtf) as string; if (rtf != null) { var p = new RtfParser(mode); return p.Parse(rtf); } return null; }
private string Parse(IDataObject data, Mode mode) { var html = data.GetData(DataFormats.Html) as string; if (html != null) { var p = new HtmlParser(mode); return(p.Parse(html)); } var rtf = data.GetData(DataFormats.Rtf) as string; if (rtf != null) { var p = new RtfParser(mode); return(p.Parse(rtf)); } return(null); }