Esempio n. 1
0
        public static int Help(RepositoryContext context, Queue <string> args)
        {
            Trace.TraceInformation("");

            using (
                var reader =
                    new StreamReader(Assembly.GetCallingAssembly().GetManifestResourceStream("projlint.readme.md"))
                )
            {
                foreach (
                    var line
                    in ReadmeFilter.SelectSections(
                        reader.ReadAllLines(),
                        "Synopsis",
                        "Commands"))
                {
                    Trace.TraceInformation(line);
                }
            }

            if (args.Any())
            {
                throw new UserException("Too many arguments");
            }

            return(0);
        }
Esempio n. 2
0
 Usage()
 {
     Trace.WriteLine("");
     Trace.WriteLine("");
     using (var reader = new StreamReader(
                Assembly.GetCallingAssembly().GetManifestResourceStream("nugit.readme.md")))
     {
         foreach (
             var line
             in ReadmeFilter.SelectSections(
                 reader.ReadAllLines(),
                 "Synopsis",
                 "Commands"))
         {
             Trace.WriteLine(line);
         }
     }
 }