public static void Main(string[] args) { foreach (string file in args) { using (FileStream f = new FileStream(file, FileMode.Open, FileAccess.Read)) Console.WriteLine(ManHelpSource.GetTextFromStream(f)); } }
public static HelpSource GetHelpSource(string provider, string basefilepath) { HelpSource result; try { switch (provider) { case "xhtml": case "hb": result = new XhtmlHelpSource(basefilepath, false); break; case "man": result = new ManHelpSource(basefilepath, false); break; case "error": result = new ErrorHelpSource(basefilepath, false); break; case "ecmaspec": result = new EcmaSpecHelpSource(basefilepath, false); break; case "ecma": result = new EcmaHelpSource(basefilepath, false); break; default: Console.Error.WriteLine("Error: Unknown provider specified: {0}", provider); result = null; break; } } catch (FileNotFoundException) { Console.Error.WriteLine("Error: did not find one of the files in sources/" + basefilepath); result = null; } return(result); }